:root{
  --om-bg:        #0B0E14;   /* canvas (Kash grey) */
  --om-surface:   #0F1218;   /* panels/cards */
  --om-surface-2: #10151C;   /* inputs */
  --om-border:    #27272a;   /* subtle edge */
  --om-border-2:  #3f3f46;   /* hover edge */
  --om-ink:       #e5e7eb;
  --om-muted:     #a1a1aa;
  --om-primary:   #4f46e5;
  --om-primary-ink:#E6EAFF;
  --rail-max:     1040px;    /* central column width */
}

html, body { 
  background: var(--om-bg); 
  color: var(--om-ink);
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Shell / Rail styling from the Vue template */
.om-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--om-bg);
  padding: calc(22px + env(safe-area-inset-top))
           clamp(16px, 2.4vw, 24px)
           28px;
  position: relative;
}

.om-hairline { 
  height: 1px; 
  width: 100%; 
  background: #1f2937; 
  opacity: .7; 
  margin-bottom: 10px; 
}

.om-rail {
  display: grid;
  grid-template-columns: minmax(0, var(--rail-max));
  justify-content: center;
  row-gap: 16px;
  position: relative;
  z-index: 10;
}

/* Panel styling */
.om-panel {
  background: var(--om-surface);
  border: 1px solid var(--om-border);
  border-radius: 10px;
  padding: 24px;
}

.om-panel--portal {
  margin-top: 8vh;
  backdrop-filter: blur(5px);
  background: rgba(15, 18, 24, 0.85);
}

.om-panel__header {
  border-bottom: 1px solid var(--om-border);
  padding-bottom: 16px;
  margin-bottom: 24px;
  text-align: center;
}

.om-title {
  font-weight: 600;
  font-size: 24px;
  margin: 0;
}

.om-tagline {
  color: var(--om-muted);
  font-size: 14px;
  margin-top: 5px;
}

/* Portal-specific styles */
.portal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
}

.portal-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.om-btn--lg {
  padding: 14px 28px;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 160px;
}

.btn-icon {
  font-size: 30px;
}

.node-info {
  margin-top: 20px;
  text-align: center;
  color: var(--om-muted);
}

.om-link {
  color: var(--om-primary);
  text-decoration: none;
}

.om-link:hover {
  text-decoration: underline;
}

.login-prompt {
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.login-prompt form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* Button styles from the Vue template */
.om-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: .55rem .9rem;
  font-size: 14px;
  font-weight: 500;
  background: #141821;
  color: var(--om-ink);
  border: 1px solid var(--om-border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.om-btn:hover {
  background: #161b24;
  border-color: var(--om-border-2);
}

.om-btn--primary {
  background: var(--om-primary);
  border-color: var(--om-primary);
  color: var(--om-primary-ink);
}

.om-btn--primary:hover {
  background: #4239c9;
  border-color: #4239c9;
}

/* Input styles from the Vue template */
.om-input {
  background: var(--om-surface-2);
  color: var(--om-ink);
  border: 1px solid var(--om-border);
  border-radius: 10px;
  padding: .8rem 1rem;
  font-size: 14px;
  width: 100%;
  outline: none;
}

.om-input:hover {
  border-color: var(--om-border-2);
}

.om-input:focus {
  border-color: color-mix(in srgb, var(--om-primary) 70%, #2B2F36);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--om-primary) 28%, transparent);
}

/* Background canvas for the cool visual effect */
.background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}
/* Logo styling */
.om-logo {
    display: block;
    width: 120px;
    height: auto;
    margin: 0 auto 15px;
    filter: invert(1); /* Invert black logo to white */
}

/* Error message styling */
.om-error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    margin: 15px 0;
    text-align: center;
}

/* Attempt warning styling */
.attempt-warning {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    margin: 15px 0;
    text-align: center;
}

/* Login form container */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px 0;
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.login-help {
    color: var(--om-muted);
    font-size: 14px;
    text-align: center;
    margin-top: 20px;
}
.login-form {
    width: 100%;
    max-width: 350px;      /* Limit to 350px or whatever you like */
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px auto;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px 0;
    width: 100%;           /* Ensures container can't overflow */
}

.om-input {
    width: 100%;
    min-width: 0;          /* This is critical inside flex layouts! */
    box-sizing: border-box;
}
