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

:root {
    --bg-page: #f3f4f6;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-input: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --danger: #ef4444;
    --success: #16a34a;
    --radius: 10px;
    --shadow: 0 4px 12px rgba(0,0,0,0.06);
    --sidebar-width: 260px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Login sayfası */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-box {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 32px;
    border: 1px solid var(--border);
}
.login-box h1 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}
.login-box .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}
.login-box .form-group {
    margin-bottom: 16px;
}
.login-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.login-box input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
}
.login-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.login-box .btn-primary {
    width: 100%;
    height: 44px;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}
.login-box .btn-primary:hover { background: var(--accent-hover); }
.login-box .login-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 12px;
    min-height: 20px;
}

/* Layout: sidebar + main */
.app-layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #111827, #020617);
    color: #e5e7eb;
    flex-shrink: 0;
}
.sidebar-header {
    padding: 20px;
    font-weight: 700;
    font-size: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-nav {
    padding: 12px 0;
}
.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-nav a.active { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer .btn-logout {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius);
    cursor: pointer;
}
.sidebar-footer .btn-logout:hover { background: rgba(220, 38, 38, 0.25); }

.main {
    flex: 1;
    min-width: 0;
    padding: 24px;
}
.page-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px;
    color: var(--text-primary);
}

/* Kartlar */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-body { padding: 20px; }

/* Butonlar */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.btn-primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}
.btn-secondary {
    background: #e5f0ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.btn-secondary:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}
.btn-danger {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}
.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    box-shadow: 0 6px 14px rgba(248, 113, 113, 0.35);
}
.btn-success {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
}
.btn-success:hover {
    background: #15803d;
    border-color: #15803d;
    box-shadow: 0 6px 14px rgba(34, 197, 94, 0.35);
}
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Tablo */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-input);
}
tbody tr:nth-child(odd) td {
    background: #ffffff;
}
tbody tr:nth-child(even) td {
    background: #f9fafb;
}
tr:hover td {
    background: #e5effe;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Form modal / panel */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: auto;
}
.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-body { padding: 20px; }
.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.modal-backdrop.hidden { display: none; }

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* Boş durum */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    font-size: 14px;
}
.empty-state .btn { margin-top: 16px; }

/* Bölüm başlıkları */
.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}
.section-title:first-of-type { margin-top: 0; }

/* Canbey POS banner (dark & light varyantlar) */
.banner-root {
    width: 100%;
    background: #0a0a0f;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    box-sizing: border-box;
}
.banner-root.banner-light {
    background: #0f172a;
}
.banner-root .bg-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,140,0,0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,140,0,0.06) 1px, transparent 1px);
    background-size: 40px 40px;
}
.banner-root .bg-glow {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,120,0,0.16) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.banner-root .top-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff7a00, #ffb300, #ff7a00, transparent);
}
.banner-root .logo-lockup {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
}
.banner-root .icon-mark {
    width: 60px;
    height: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}
.banner-root .icon-hex {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255,122,0,0.4);
    border-radius: 18px;
    transform: rotate(10deg);
}
.banner-root .icon-hex2 {
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(255,179,0,0.25);
    border-radius: 14px;
    transform: rotate(-10deg);
}
.banner-root .icon-inner {
    position: relative;
    z-index: 3;
}
.banner-root .brand-name {
    font-family: 'Syne', system-ui, sans-serif;
    font-weight: 800;
    font-size: 34px;
    letter-spacing: 4px;
    color: #ffffff;
    line-height: 1;
    position: relative;
}
.banner-root.banner-light .brand-name {
    color: #f9fafb;
}
.banner-root .brand-name span.c {
    color: #ff7a00;
}
.banner-root .brand-name::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,122,0,0.5), transparent);
}
.banner-root .pos-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
    border: 1px solid rgba(255,122,0,0.35);
    border-radius: 100px;
    margin-top: 4px;
}
.banner-root .pos-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff7a00;
}
.banner-root .pos-text {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 2px;
    color: #ff9a30;
    text-transform: uppercase;
}
.banner-root .divider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    width: 220px;
}
.banner-root .divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255,122,0,0.2);
}
.banner-root .divider-diamond {
    width: 5px;
    height: 5px;
    background: #ff7a00;
    transform: rotate(45deg);
}
.banner-root .tagline {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 1.2px;
    color: rgba(249,250,251,0.6);
    margin-top: 10px;
    text-transform: uppercase;
}

/* Responsive breakpointler */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }

    .main {
        padding: 16px;
    }

    .page-title {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .card-body {
        padding: 16px;
    }

    th, td {
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 8px 12px;
        box-sizing: border-box;
    }

    .sidebar-header {
        padding: 0;
        margin-right: 12px;
        border-bottom: none;
        font-size: 16px;
    }

    .sidebar-nav {
        display: flex;
        flex: 1;
        padding: 0;
        overflow-x: auto;
    }

    .sidebar-nav a {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 13px;
    }

    .sidebar-footer {
        margin-top: 0;
        padding: 0;
        margin-left: 8px;
        border-top: none;
    }

    .sidebar-footer .btn-logout {
        padding: 6px 10px;
        font-size: 12px;
    }

    .main {
        padding: 12px;
    }

    .page-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .card {
        margin-bottom: 16px;
    }

    .card-header {
        padding: 12px 14px;
        font-size: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .card-body {
        padding: 12px 14px;
    }

    .actions {
        flex-direction: column;
    }

    .login-box {
        padding: 24px 20px;
    }

    .banner-root {
        padding: 24px 16px;
        min-height: 200px;
    }

    .banner-root .brand-name {
        font-size: 26px;
    }

    .banner-root .logo-lockup {
        gap: 6px;
    }

    .banner-root .divider-row {
        width: 180px;
        margin-top: 10px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 8px 10px;
    }

    .btn,
    .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }

    .modal {
        max-width: 100%;
    }
}
