/*
 * Teksen Koleji - Kantin Takip Sistemi
 * Developer : Aydın YENER
 * Email     : aydinyener@outlook.com
 * Phone     : 0533 568 65 25
 * Date      : 2026
 */

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

:root {
    --primary: #212883;
    --primary-light: #2d35a0;
    --primary-dark: #1a2068;
    --accent: #e46611;
    --accent-light: #f07a2a;
    --accent-dark: #c8560e;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* LOGIN PAGE */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #212883 0%, #1a2068 50%, #e46611 100%);
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-card .logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 24px rgba(33, 40, 131, 0.3);
}

.login-card .logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 .25rem;
}

.login-card h1 .brand-teksen { color: var(--primary); }
.login-card h1 .brand-koleji { color: var(--accent); }

.login-card .subtitle {
    color: var(--gray-500);
    font-size: .9rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: .4rem;
}

.form-control {
    width: 100%;
    padding: .75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    transition: all .2s;
    outline: none;
    background: var(--gray-50);
}

.form-control:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(33, 40, 131, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    width: 100%;
    padding: .85rem;
    box-shadow: 0 4px 12px rgba(33, 40, 131, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(33, 40, 131, 0.4);
}

.btn-outline {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(228, 102, 17, 0.04);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: 0 4px 12px rgba(228, 102, 17, 0.3);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(228, 102, 17, 0.4);
}

.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* APP LAYOUT */
.app-navbar-wrap {
    background: white;
    border-bottom: 3px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 210;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.app-navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-navbar .brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.app-navbar .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(33, 40, 131, 0.2);
}

.app-navbar .brand .brand-teksen { color: var(--primary); }
.app-navbar .brand .brand-koleji { color: var(--accent); }
.app-navbar .brand .brand-kantin {
    font-size: .7rem;
    font-weight: 500;
    color: var(--gray-400);
    display: block;
    line-height: 1;
    margin-top: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links .mobile-user {
    display: none;
}

.nav-links a {
    padding: .5rem .85rem;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: all .15s;
    white-space: nowrap;
}

.nav-links a:hover {
    background: rgba(33, 40, 131, 0.06);
    color: var(--primary);
}

.nav-links a.active {
    background: var(--primary);
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user .user-name {
    font-size: .875rem;
    font-weight: 500;
    color: var(--gray-700);
    text-transform: uppercase;
}

.nav-user .btn-logout {
    padding: .4rem .75rem;
    font-size: .8rem;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all .15s;
    border: none;
    cursor: pointer;
}

.nav-user .btn-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    position: relative;
    width: 40px;
    height: 40px;
    z-index: 220;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    border-radius: 2px;
    transition: all .3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
    background: var(--accent);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
    background: var(--accent);
}

/* MAIN CONTENT */
.app-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* DASHBOARD CARDS */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-card .stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-card .stat-icon.blue {
    background: rgba(33, 40, 131, 0.1);
}
.stat-card .stat-icon.blue svg { fill: var(--primary); }

.stat-card .stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
}
.stat-card .stat-icon.green svg { fill: var(--success); }

.stat-card .stat-icon.orange {
    background: rgba(228, 102, 17, 0.1);
}
.stat-card .stat-icon.orange svg { fill: var(--accent); }

.stat-card .stat-label {
    font-size: .8rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .25rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-card .stat-value.positive { color: var(--success); }
.stat-card .stat-value.negative { color: var(--danger); }

/* SECTION */
.section-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.section-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.section-body {
    padding: 1.5rem;
}

/* TABS */
.tab-nav {
    display: flex;
    gap: .25rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
    flex-wrap: wrap;
}

.tab-nav a {
    padding: .5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
    color: var(--gray-500);
    text-decoration: none;
    transition: all .15s;
}

.tab-nav a:hover {
    color: var(--gray-700);
    background: white;
}

.tab-nav a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(33, 40, 131, 0.25);
}

/* TABLE */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: .75rem 1rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .05em;
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: .75rem 1rem;
    font-size: .875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.data-table tr:hover td {
    background: var(--gray-50);
}

.data-table .amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.data-table .amount.expense { color: var(--danger); }
.data-table .amount.income { color: var(--success); }

.table-footer {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-top: 2px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .875rem;
}

.table-footer .total {
    font-weight: 700;
    font-size: 1rem;
}

/* PAGINATION */
.pagination {
    display: flex;
    gap: .25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination a, .pagination span {
    padding: .4rem .7rem;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    transition: all .15s;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* VELI MESAJI */
.message-box {
    background: var(--gray-50);
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    font-size: .9rem;
    color: var(--gray-600);
    min-height: 60px;
    line-height: 1.6;
}

.message-box.has-content {
    border-style: solid;
    border-color: var(--primary);
    background: rgba(33, 40, 131, 0.03);
    color: var(--gray-800);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-400);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    fill: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: .9rem;
}

/* MOBILE OVERLAY */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 205;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .3s;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
        flex-direction: column;
        padding: 5rem 0 2rem;
        gap: 0;
        z-index: 215;
        transition: right .3s ease;
        box-shadow: none;
        overflow-y: auto;
    }

    .nav-links.open {
        right: 0;
        box-shadow: -8px 0 30px rgba(0,0,0,.3);
    }

    .nav-links li {
        list-style: none;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: 1rem 1.5rem;
        color: rgba(255,255,255,.75);
        font-size: .95rem;
        font-weight: 500;
        border-radius: 0;
        transition: all .15s;
        border-left: 3px solid transparent;
    }

    .nav-links a:hover {
        background: rgba(255,255,255,.1);
        color: white;
    }

    .nav-links a.active {
        background: rgba(255,255,255,.15);
        color: white;
        border-left-color: var(--accent);
        border-radius: 0;
    }

    .nav-links .mobile-user {
        display: list-item;
        list-style: none;
        margin-top: auto;
        padding: 1.25rem 1.5rem;
        border-top: 1px solid rgba(255,255,255,.1);
    }

    .nav-links .mobile-user .mobile-user-name {
        display: block;
        color: rgba(255,255,255,.6);
        font-size: .8rem;
        margin-bottom: .75rem;
        text-transform: uppercase;
    }

    .nav-links .mobile-user .mobile-logout {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        padding: .6rem 1rem;
        background: rgba(255,255,255,.1);
        color: white;
        border-radius: var(--radius-sm);
        font-size: .85rem;
        font-weight: 500;
        text-decoration: none;
        transition: all .15s;
    }

    .nav-links .mobile-user .mobile-logout:hover {
        background: rgba(239,68,68,.3);
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .nav-user {
        display: none;
    }

    .app-content {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .data-table th, .data-table td {
        padding: .5rem .5rem;
        font-size: .75rem;
    }

    .data-table .hide-mobile {
        display: none;
    }

    .section-header {
        padding: 1rem;
    }

    .tab-nav {
        padding: .75rem 1rem;
    }

    .table-footer {
        flex-direction: column;
        gap: .75rem;
        text-align: center;
    }
}
