/* =============================================================================
 * auth.css — shared styles for login / register / confirm screens.
 * External per the project's strict-CSP rule (no inline style="..." attributes).
 * ============================================================================= */

.error-msg {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0 0 12px 0;
    font-size: 14px;
}

.success-msg {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0 0 12px 0;
    font-size: 14px;
}

/* Informational notice (non-fatal). Used by confirm.php when registration
   succeeds but no cloud storage could be allocated (server full). */
.notice-msg {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0 0 12px 0;
    font-size: 14px;
}

/* OTP input boxes shared by login and register/confirm. */
.codebox {
    width: 36px;
    height: 44px;
    margin-right: 4px;
    text-align: center;
    font-size: 22px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}

.codebox:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* Inline forms (e.g. the revoke-share ✕ button). */
.inline-form {
    display: inline;
}


button{
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: white;
    cursor: pointer;
    font-size: 12px;
}


.otp-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    margin-bottom: 1rem;
}

.auth-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.auth-inline {
    margin: 0;
}

.auth-inline button {
    width: auto;
    min-width: 140px;
}


/* NAV (unified) */
.nav,
.page-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.nav a {
  display: block;
  padding: 10px;
  margin-bottom: 8px;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-light);
  transition: .15s;
}

.nav-links{
    display: contents;
}

.nav a:hover {
  color: var(--text);
  background: #1b2a4d;
}

.nav a.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

@media (max-width: 640px) {

    .otp-container {
        gap: 0.4rem;
    }

    .auth-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-inline button {
        width: 100%;
    }

}

.auth-form {
    max-width: 520px;
    margin: 1.75rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input {
    width: 100%;
    box-sizing: border-box;

    padding: 0.95rem 1rem;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--bg);
    color: var(--text);

    font-size: 1rem;
    line-height: 1.4;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus {
    outline: none;

    border-color: var(--accent);

    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.15);

    background: var(--panel);
}

.auth-form .btn-primary {
    align-self: center;

    min-width: 220px;

    margin-top: 0.5rem;

    padding: 0.9rem 1.5rem;

    border: 0;
    border-radius: 12px;

    cursor: pointer;

    font-size: 1rem;
    font-weight: 600;
}

.card h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.card > p {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {

    .auth-form {
        max-width: 100%;
        margin-top: 1.5rem;
    }

    .form-group input {
        padding: 1rem;
        font-size: 16px; /* prevents iOS zoom */
    }

    .auth-form .btn-primary {
        width: 100%;
        min-width: 0;
    }
}