/* ==============================================
   İK İşleri — Auth Pages (Login / Register)
   Theme: Navy + Cream + Crimson
   Fonts: Cormorant Garamond + DM Sans
   ============================================== */

:root {
    --navy:       #0d1b2a;
    --navy-mid:   #162032;
    --cream:      #f7f4ef;
    --cream-dark: #ede9e0;
    --white:      #ffffff;
    --crimson:    #c0392b;
    --crimson-dk: #96281b;
    --gold:       #c9943a;
    --text-navy:  #0d1b2a;
    --text-mid:   #3a4d63;
    --text-muted: #6b7f96;
    --border:     #ddd9d0;
    --success:    #2d7d5a;
    --error:      #c0392b;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    color: var(--text-navy);
    background: var(--cream);
}

/* ---- SHELL ---- */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ---- BRAND PANEL (left) ---- */
.auth-brand {
    background: var(--navy);
    display: flex;
    flex-direction: column;
    padding: 48px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.auth-brand-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(ellipse at 80% 10%, rgba(192,57,43,0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 90%, rgba(201,148,58,0.08) 0%, transparent 45%);
}

.auth-brand-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    z-index: 1;
    margin-bottom: auto;
}

.auth-logo span {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.02em;
}

.auth-brand-body {
    position: relative;
    z-index: 1;
    margin-bottom: 48px;
}

.auth-brand-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 52px;
    font-weight: 600;
    color: white;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.auth-brand-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--gold);
}

.auth-brand-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.55);
    line-height: 1.65;
    max-width: 340px;
    margin-bottom: 32px;
}

.auth-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.65);
}

.auth-brand-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.auth-brand-footer span,
.auth-brand-footer a {
    font-size: 12px;
    color: rgba(255,255,255,0.25);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-brand-footer a:hover { color: rgba(255,255,255,0.55); }

/* ---- FORM PANEL (right) ---- */
.auth-panel {
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 64px;
    overflow-y: auto;
}

.auth-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.auth-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-top-color: var(--crimson);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- FORM WRAP ---- */
.auth-form-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 36px;
}

.auth-form-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 40px;
    font-weight: 600;
    color: var(--text-navy);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 8px;
}

.auth-form-header p {
    font-size: 15px;
    color: var(--text-muted);
}

/* ---- ERROR / SUCCESS MESSAGE ---- */
.auth-error {
    padding: 12px 16px;
    background: #fdf0ef;
    border: 1px solid rgba(192,57,43,0.2);
    border-left: 3px solid var(--crimson);
    border-radius: 6px;
    font-size: 13px;
    color: var(--crimson);
    margin-bottom: 24px;
}

.auth-success {
    padding: 12px 16px;
    background: #f0fdf5;
    border: 1px solid rgba(45,125,90,0.2);
    border-left: 3px solid var(--success);
    border-radius: 6px;
    font-size: 13px;
    color: var(--success);
    margin-bottom: 24px;
}

/* ---- FIELD GROUP ---- */
.field-group {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    margin-bottom: 7px;
    letter-spacing: 0.01em;
}

.field-section-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ---- INPUT ---- */
.auth-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--text-navy);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.auth-input::placeholder { color: var(--text-muted); }

.auth-input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(13,27,42,0.07);
}

.auth-input.email-valid   { border-color: var(--success); }
.auth-input.email-invalid { border-color: var(--error); }

/* ---- PASSWORD WRAP ---- */
.password-wrap {
    position: relative;
}

.password-wrap .auth-input { padding-right: 44px; }

.pwd-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.pwd-toggle:hover { color: var(--text-navy); }

.pwd-toggle .material-icons {
    font-size: 18px !important;
}

/* ---- PASSWORD STRENGTH ---- */
.strength-wrap {
    margin-top: 10px;
    padding: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    display: none;
}

.strength-wrap.visible { display: block; }

.strength-bar {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
    background: var(--border);
    width: 0%;
}

.strength-fill.strength-very-weak { background: #e74c3c; }
.strength-fill.strength-weak      { background: #e67e22; }
.strength-fill.strength-fair      { background: #f1c40f; }
.strength-fill.strength-good      { background: #2ecc71; }
.strength-fill.strength-strong    { background: var(--success); }

.req-list { display: flex; flex-direction: column; gap: 5px; }

.req-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.req-item.met { color: var(--success); }

.req-icon { font-size: 13px; width: 14px; }

/* ---- AUTH ROW (remember me + forgot) ---- */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-mid);
    cursor: pointer;
    user-select: none;
}

.auth-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--crimson);
    cursor: pointer;
}

.auth-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link:hover { color: var(--crimson); }

/* ---- SUBMIT BUTTON ---- */
.auth-btn {
    width: 100%;
    padding: 13px;
    background: var(--crimson);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover { background: var(--crimson-dk); transform: translateY(-1px); }
.auth-btn:active { transform: translateY(0); }

.auth-btn.loading { pointer-events: none; opacity: 0.85; }
.auth-btn.loading .btn-text { display: none; }
.auth-btn.loading .btn-loading { display: flex !important; }

.btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ---- DIVIDER ---- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* ---- SWITCH LINK ---- */
.auth-switch {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--crimson);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover { text-decoration: underline; }

/* ---- SECONDARY LINKS ---- */
.auth-extra-links {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.auth-extra-links a {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-extra-links a:hover { color: var(--text-navy); }

/* ---- LEGAL ---- */
.auth-legal {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

.auth-legal a {
    color: var(--text-mid);
    text-decoration: none;
}

.auth-legal a:hover { color: var(--crimson); }

/* ---- SECURITY BADGES ---- */
.auth-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
}

.auth-badge .material-icons {
    font-size: 14px !important;
    color: var(--success);
}

/* ---- VALIDATION ---- */
.auth-validation {
    display: block;
    font-size: 12px;
    color: var(--error);
    margin-top: 5px;
    margin-left: 2px;
}

/* ---- EXTERNAL LOGIN (ExternalLoginPicker uses these) ---- */
.external-login-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.external-login-btn {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: white;
    color: var(--text-navy);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.external-login-btn:hover {
    border-color: var(--navy);
    background: var(--cream);
}

.google-btn:hover   { border-color: #db4437; background: #fdf5f5; }
.linkedin-btn:hover { border-color: #0077B5; background: #f0f8ff; }

.no-external-providers {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ---- EMAIL VALIDATION STATES ---- */
.auth-input.email-valid   { border-color: var(--success); }
.auth-input.email-invalid { border-color: var(--error); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-panel { padding: 40px 24px; min-height: 100vh; }
}

@media (max-width: 480px) {
    .auth-panel { padding: 32px 20px; }
    .auth-form-header h2 { font-size: 32px; }
}

/* ---- MANAGE LAYOUT ---- */
.manage-shell {
    min-height: 100vh;
    background: var(--cream);
    font-family: 'DM Sans', sans-serif;
}

.manage-topbar {
    background: var(--navy);
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.manage-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
}

.manage-logo span {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.manage-topbar-divider {
    color: rgba(255, 255, 255, 0.25);
    font-size: 16px;
}

.manage-topbar-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.01em;
}

.manage-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

.manage-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 80px 24px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ---- PROFILE HEADER ---- */
.manage-profile-header {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.manage-avatar {
    width: 64px;
    height: 64px;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.manage-profile-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.manage-profile-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--text-navy);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.manage-profile-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.manage-role-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--navy);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
}

.manage-profile-email {
    font-size: 13px;
    color: var(--text-muted);
}
