@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --navy: #0c1a2e;
    --navy-mid: #152642;
    --navy-light: #1e3558;
    --steel: #4a6278;
    --steel-light: #6b8499;
    --silver: #c8d4df;
    --silver-bg: #eef2f6;
    --white: #ffffff;
    --accent: #2d5a8a;
    --accent-hover: #1e4570;
    --success: #1b6b3a;
    --success-bg: #e8f5ec;
    --error: #b71c1c;
    --error-bg: #fdecea;
    --shadow-sm: 0 2px 8px rgba(12, 26, 46, 0.06);
    --shadow-md: 0 8px 24px rgba(12, 26, 46, 0.1);
    --shadow-lg: 0 16px 48px rgba(12, 26, 46, 0.18);
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--silver-bg);
    color: var(--navy);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Header ── */
.site-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
    color: var(--white);
    padding: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.header-logo {
    height: 56px;
    width: auto;
    max-width: 155px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.header-text h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.header-text p {
    font-size: 0.78rem;
    opacity: 0.75;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 2px;
}

.header-actions {
    flex-shrink: 0;
}

.btn-logout {
    padding: 8px 18px;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--white);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ── Main layout ── */
main {
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(74, 98, 120, 0.1);
}

.full-width { width: 100%; }

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--silver-bg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--accent), var(--navy-light));
    border-radius: 2px;
    flex-shrink: 0;
}

.hint {
    font-size: 0.85rem;
    color: var(--steel);
    margin-bottom: 16px;
}

/* ── Forms ── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field.full-width { grid-column: 1 / -1; }

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--steel);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

input, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--silver);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--navy);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input::placeholder, textarea::placeholder {
    color: var(--steel-light);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(45, 90, 138, 0.12);
}

.yuzde-input {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--silver);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.yuzde-input:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(45, 90, 138, 0.12);
}

.yuzde-input span {
    background: var(--silver-bg);
    color: var(--accent);
    font-weight: 700;
    padding: 11px 14px;
    border-right: 1.5px solid var(--silver);
    display: flex;
    align-items: center;
}

.yuzde-input input {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* ── Tabs ── */
.tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    background: var(--silver-bg);
    border-radius: var(--radius);
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 11px 16px;
    border: none;
    background: transparent;
    color: var(--steel);
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.tab-btn.active {
    background: var(--white);
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}

.tab-btn:not(.active):hover {
    color: var(--navy);
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
    padding: 11px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--navy-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(45, 90, 138, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--navy-mid) 100%);
    box-shadow: 0 6px 16px rgba(45, 90, 138, 0.35);
}

.btn-primary:disabled {
    background: var(--steel-light);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--silver-bg);
    color: var(--navy);
    border: 1.5px solid var(--silver);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--silver);
    border-color: var(--steel-light);
}

.btn-small {
    padding: 6px 14px;
    font-size: 0.78rem;
    border-radius: 8px;
}

.btn-edit {
    background: rgba(45, 90, 138, 0.1);
    color: var(--accent);
    border: 1px solid rgba(45, 90, 138, 0.2);
}

.btn-edit:hover {
    background: rgba(45, 90, 138, 0.18);
}

.btn-delete {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(183, 28, 28, 0.2);
}

.btn-delete:hover {
    background: #f9d5d2;
}

/* ── Messages ── */
.message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
}

.message.success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(27, 107, 58, 0.2);
}

.message.error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(183, 28, 28, 0.2);
}

/* ── Kayıt listesi ── */
.list-section .section-title span {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--steel);
    margin-left: 4px;
}

#aramaInput {
    background: var(--silver-bg);
    border-color: transparent;
}

#aramaInput:focus {
    background: var(--white);
}

.kayit-listesi {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.kayit-listesi::-webkit-scrollbar {
    width: 6px;
}

.kayit-listesi::-webkit-scrollbar-thumb {
    background: var(--silver);
    border-radius: 3px;
}

.kayit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--silver-bg);
    border-radius: var(--radius);
    margin-bottom: 6px;
    transition: border-color 0.15s, box-shadow 0.15s;
    gap: 12px;
}

.kayit-item:hover {
    border-color: var(--silver);
    box-shadow: var(--shadow-sm);
}

.kayit-info strong {
    font-size: 1.05rem;
    color: var(--navy);
    letter-spacing: 0.04em;
}

.kayit-info span {
    display: block;
    font-size: 0.8rem;
    color: var(--steel);
    margin-top: 3px;
}

.kayit-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.empty {
    text-align: center;
    color: var(--steel-light);
    padding: 32px;
    font-size: 0.9rem;
}

.firma-grup { margin-bottom: 16px; }

.firma-baslik {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 16px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.firma-baslik span {
    font-weight: 400;
    opacity: 0.75;
    font-size: 0.82rem;
    margin-left: 6px;
}

/* ── Login ── */
.login-screen {
    position: fixed;
    inset: 0;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    background-image:
        radial-gradient(ellipse at 20% 80%, rgba(45, 90, 138, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(74, 98, 120, 0.2) 0%, transparent 50%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 50%, #0a1220 100%);
    padding: 12px 16px;
}

.login-wrapper {
    width: 100%;
    max-width: 360px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    width: 100%;
    flex-shrink: 0;
}

.login-logo {
    display: block;
    margin: 0 auto;
    height: auto;
    max-height: 118px;
    max-width: 210px;
    width: auto;
    object-fit: contain;
}

.login-app-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    line-height: 1.15;
}

.login-app-tagline {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.login-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
    text-align: center;
}

.login-card .login-subtitle {
    text-align: center;
    color: var(--steel);
    margin-bottom: 14px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.login-btn {
    width: 100%;
    margin-top: 4px;
    padding: 11px;
    font-size: 0.92rem;
}

.login-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    line-height: 1.3;
    flex-shrink: 0;
}

/* ── Excel box ── */
.excel-box {
    background: linear-gradient(135deg, rgba(45, 90, 138, 0.04) 0%, rgba(12, 26, 46, 0.04) 100%);
    border: 2px dashed rgba(45, 90, 138, 0.35);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.excel-label {
    font-weight: 700;
    color: var(--navy);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
    display: block;
}

.excel-file-input {
    margin-bottom: 12px;
    padding: 10px;
    background: var(--white);
    border: 1.5px solid var(--silver);
    border-radius: var(--radius);
    font-size: 0.88rem;
    cursor: pointer;
}

.excel-help {
    font-size: 0.82rem;
    color: var(--steel);
    margin-bottom: 14px;
    line-height: 1.6;
}

.excel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.excel-durum {
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--success);
    font-weight: 600;
}

.excel-durum.error { color: var(--error); }

/* ── Responsive ── */
@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }

    .header-inner {
        flex-wrap: wrap;
        padding: 14px 16px;
    }

    .header-logo {
        height: 48px;
        max-width: 130px;
    }

    .header-text h1 { font-size: 1.05rem; }

    .header-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    main { padding: 16px; }

    section { padding: 20px; }

    .kayit-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .kayit-actions { width: 100%; }

    .login-logo {
        max-height: 100px;
        max-width: 180px;
    }

    .login-app-title { font-size: 1.2rem; }

    .login-card { padding: 16px 18px; }
}
