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

:root {
    /* 1. Foundations - Color Palette */
    --brand-primary: #000000;
    --brand-primary-rgb: 17, 17, 17;
    --brand-secondary: #5348ce;
    --brand-secondary-rgb: 83, 72, 206;

    --success: #10B981;
    --success-bg: #ECFDF5;
    --error: #EF4444;
    --error-bg: #FEF2F2;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --info: #3B82F6;
    --info-bg: #EFF6FF;

    /* Neutrals */
    --bg-main: #f5f5f5;
    --bg-card: #FFFFFF;
    --text-main: #000000;
    --text-muted: #666666;
    --text-disabled: #A1A1AA;
    --border-color: #d1d5db;
    --border-hover: #D1D1D1;
    --border-card-color: #e5e7eb;

    /* 1. Foundations - Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 40px 80px rgba(0, 0, 0, 0.08);
    --shadow-brand: 0 10px 20px rgba(var(--brand-primary-rgb), 0.15);
    --shadow-default: 0 1px 2px 0 rgb(0 0 0 / 0.05);

    /* Spacing System - Precise Values */
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 80px;
    --space-2xl: 120px;

    /* Radius - 4'ün katları */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Zugo Footer --- */
.app-footer {
    background: #1A1A1A;
    color: white;
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.app-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.app-footer-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.01em;
}

.app-footer-brand {
    font-weight: 700;
    color: white;
}

/* --- Base Styles --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Red Hat Display', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* iOS Keyboard Fix */
    overflow: hidden;
    overscroll-behavior: none;
    position: fixed;
    width: 100%;
    height: 100%;
}

html {
    scroll-behavior: smooth;
    /* iOS Keyboard Fix */
    overflow: hidden;
    overscroll-behavior: none;
    height: 100%;
}

/* --- Accessibility --- */
/* Skip Link for Keyboard Users */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 12px 24px;
    background: var(--brand-primary);
    color: white;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 16px;
}

/* Focus Visible Styles */
*:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--brand-secondary);
    outline-offset: 2px;
}

input:focus-visible {
    outline: none;
}

/* Remove default focus for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Layout Utils --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-xl) 0;
}

.flex {
    display: flex;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* --- Typography --- */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
}

h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    /* Reduced for mobile-first design */
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

p:not(:last-child) {
    margin-bottom: var(--space-md);
}

small {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: #F0F0F0;
    color: var(--text-muted);
    border: 1px solid transparent;
}

/* Badge Colors - Filled */
.badge-primary {
    background: var(--brand-primary);
    color: white;
}

.badge-secondary {
    background: var(--brand-secondary);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-error {
    background: var(--error);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-info {
    background: var(--info);
    color: white;
}

/* Badge Colors - Soft/Light */
.badge-success-soft {
    background: var(--success-bg);
    color: #065F46;
    border-color: #A7F3D0;
}

.badge-error-soft {
    background: var(--error-bg);
    color: #991B1B;
    border-color: #FECACA;
}

.badge-warning-soft {
    background: var(--warning-bg);
    color: #92400E;
    border-color: #FDE68A;
}

.badge-info-soft {
    background: var(--info-bg);
    color: #1E40AF;
    border-color: #BFDBFE;
}

/* Badge Outline */
.badge-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.badge-outline-primary {
    background: transparent;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Badge Sizes */
.badge-sm {
    padding: 4px 8px;
    font-size: 0.65rem;
}

.badge-lg {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* Status Dot */
.badge-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

/* Badge with Icon */
.badge i,
.badge svg {
    width: 14px;
    height: 14px;
}

/* --- 2. Input Controls - Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    border: 1px solid transparent;
    gap: 8px;
    font-size: 0.95rem;
    outline: none;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-default);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--brand-secondary);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-default);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), 0.05);
}

.btn-ghost {
    background: transparent;
    color: var(--brand-primary);
}

.btn-ghost:hover {
    background: rgba(var(--brand-primary-rgb), 0.05);
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
}

/* --- 2. Input Controls - Fields --- */
.input-group {
    margin-bottom: var(--space-md);
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    padding-left: 4px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper i,
.input-wrapper svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    opacity: 0.6;
    pointer-events: none;
    width: 18px;
    height: 18px;
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: white;
    font-family: inherit;
    transition: var(--transition-fast);
    outline: none;
    font-size: 1rem;
    color: var(--text-main);
}

.form-input-icon {
    padding-left: 48px;
}

.form-input:focus {
    border-color: var(--brand-secondary);
}

.form-input.error {
    border-color: var(--error);
}

.form-input.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.error-text {
    color: var(--error);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: var(--space-xs);
    display: block;
}

.form-input[disabled] {
    background: #F5F5F5;
    cursor: not-allowed;
    color: var(--text-disabled);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 48px;
}

/* Hide native date/time picker icons */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* --- Selection Controls (Check, Radio, Toggle) --- */
.checkbox-group,
.radio-group {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    user-select: none;
}

.selection-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom,
.radio-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    position: relative;
    transition: var(--transition-fast);
    background: white;
    flex-shrink: 0;
}

.radio-custom {
    border-radius: 50%;
}

.checkbox-group:hover .checkbox-custom,
.radio-group:hover .radio-custom {
    border-color: var(--brand-primary);
}

.selection-input:checked+.checkbox-custom,
.selection-input:checked+.radio-custom {
    background: var(--brand-secondary);
    border-color: var(--brand-secondary);
}

.checkbox-custom:after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.radio-custom:after {
    content: '';
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.selection-input:checked+.checkbox-custom:after,
.selection-input:checked+.radio-custom:after {
    display: block;
}

/* --- Switch (Toggle) --- */
.switch {
    display: inline-block;
    width: 48px;
    height: 26px;
    position: relative;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E5E5E5;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: var(--shadow-default);
}

input:checked+.slider {
    background-color: var(--brand-secondary);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* --- 3. Navigation --- */
.nav-wrapper {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: fit-content;
}

.nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    display: flex;
    gap: 4px;
    box-shadow: var(--shadow-default);
}

.nav-link {
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: 0.3s;
}

.nav-link.active,
.nav-link:hover {
    background: white;
    box-shadow: var(--shadow-default);
    color: var(--brand-primary);
}

.tabs {
    display: flex;
    gap: 8px;
    background: #f0f0f0;
    padding: 6px;
    border-radius: var(--radius-pill);
    width: fit-content;
}

.tab {
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    background: transparent;
}

.tab.active {
    background: white;
    box-shadow: var(--shadow-default);
    color: var(--brand-primary);
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.breadcrumbs span:after {
    content: '/';
    margin-left: 8px;
    opacity: 0.4;
}

.breadcrumbs b {
    color: var(--text-main);
    font-weight: 600;
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.page-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: 0.3s;
}

.page-link.active,
.page-link:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

/* Banner Placeholder */
.banner-placeholder {
    width: 100%;
    background-color: #F3F4F6;
    border: 2px dashed #CBD5E1;
    border-radius: var(--radius-sm);
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-md);
    margin: var(--space-md) 0;
    text-align: center;
    min-height: 50px;
    /* Default min height */
    transition: all 0.3s ease;
}

/* Banner Sizes */
.banner-sm {
    min-height: 80px;
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    gap: 16px;
}

.banner-sm .btn {
    width: auto !important;
    /* Override full width for small banners */
    padding: 6px 16px !important;
}

.banner-md {
    min-height: 160px;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.banner-lg {
    min-height: 240px;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: var(--space-lg);
}

/* --- Sidebar --- */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: var(--space-md);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: .3s;
}

.sidebar-link i,
.sidebar-link svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: #F8F8F8;
    color: var(--brand-primary);
}

/* --- 4. Information & Feedback --- */
.alert {
    padding: 16px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert:not(:last-child) {
    margin-bottom: var(--space-sm);
}

.alert i,
.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-bg);
    color: #065F46;
    border-color: #A7F3D0;
}

.alert-error {
    background: var(--error-bg);
    color: #991B1B;
    border-color: #FECACA;
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400E;
    border-color: #FDE68A;
}

.alert-info {
    background: var(--info-bg);
    color: #1E40AF;
    border-color: #BFDBFE;
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: .4s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-xs);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-default);
    transform: translateY(40px);
    transition: .4s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: #F0F0F0;
}

.modal-close i,
.modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.modal-body {
    margin-bottom: var(--space-md);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* --- Drawer (Slide from Right) --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: white;
    box-shadow: var(--shadow-default);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 2001;
}

.drawer-overlay.active .drawer,
.drawer.active {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.drawer-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.drawer-body {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
}

.drawer-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* Drawer Left */
.drawer-left {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

.drawer-overlay.active .drawer-left,
.drawer-left.active {
    transform: translateX(0);
}

/* --- Bottom Sheet (Slide from Bottom) --- */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-xs) var(--radius-xs) 0 0;
    box-shadow: var(--shadow-default);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 2001;
}

.bottom-sheet-overlay.active .bottom-sheet,
.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: #DDD;
    border-radius: 2px;
    margin: 12px auto;
    cursor: grab;
}

.bottom-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-md) var(--space-sm);
}

.bottom-sheet-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.bottom-sheet-body {
    flex: 1;
    padding: 0 var(--space-md) var(--space-md);
    overflow-y: auto;
}

.bottom-sheet-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: var(--space-sm);
}

.bottom-sheet-footer .btn {
    flex: 1;
}

/* --- Fullscreen Modal --- */
.modal-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2001;
    transform: scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    display: flex;
    flex-direction: column;
}

.modal-fullscreen.active {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.modal-fullscreen .modal-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.modal-fullscreen .modal-body {
    flex: 1;
    padding: var(--space-lg);
    overflow-y: auto;
    margin-bottom: 0;
}

.modal-fullscreen .modal-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--border-color);
}

/* --- Progress --- */
.progress-container {
    width: 100%;
    height: 8px;
    background: #EEE;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--brand-primary);
    transition: 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- 5. Data Display --- */
.card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    box-shadow: var(--shadow-default);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-default);
}

/* --- Vehicle Card --- */
.vehicle-card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.vehicle-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.vehicle-card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vehicle-icon {
    width: 48px;
    height: 48px;
    background: #F5F5F5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vehicle-icon i,
.vehicle-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-main);
}

.vehicle-plate {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.vehicle-chassis {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
}

.copy-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    background: #F0F0F0;
}

.copy-btn i,
.copy-btn svg {
    width: 14px;
    height: 14px;
    color: var(--brand-primary);
}

.vehicle-menu-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.vehicle-menu-btn:hover {
    background: #F0F0F0;
}

.vehicle-menu-btn i,
.vehicle-menu-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.vehicle-card-body {
    padding: var(--space-md);
}

.vehicle-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.vehicle-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.vehicle-code {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--success);
}

.vehicle-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.vehicle-color {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 12px;
}

.vehicle-specs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vehicle-spec {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.vehicle-spec.highlight {
    color: var(--success);
    font-weight: 600;
}

.vehicle-spec-divider {
    width: 1px;
    height: 16px;
    background: var(--border-color);
}

/* --- Listing Price (İlan Fiyatı) --- */
.vehicle-listing-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px var(--space-sm);
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    border-radius: var(--radius-sm);
    margin-top: var(--space-xs);
}

.listing-price-label {
    font-size: 0.85rem;
    color: var(--warning);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.listing-price-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--warning);
}

.vehicle-price-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.vehicle-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.vehicle-price-info {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    cursor: help;
}

/* --- Customer Card --- */
.customer-card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.customer-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
}

.customer-card-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.customer-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #F0F0F0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--text-main);
}

.customer-avatar i,
.customer-avatar svg {
    width: 28px;
    height: 28px;
    color: var(--text-main);
}

.customer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.customer-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.customer-type {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.customer-phone {
    font-size: 0.95rem;
    color: var(--text-main);
}

.customer-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.customer-actions {
    display: flex;
    gap: 8px;
}

.customer-action-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.customer-action-btn:hover {
    background: #F0F0F0;
}

.customer-action-btn i,
.customer-action-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.btn-invoice {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--success);
    color: var(--success);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-invoice:hover {
    background: rgba(34, 197, 94, 0.1);
}

.table-container {
    background: white;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 16px 24px;
    background: #FAFAFA;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}

td {
    padding: 20px 24px;
    border-bottom: 1px solid #F6F6F6;
    font-size: 0.95rem;
    vertical-align: middle;
}

/* Row hover */
tbody tr:hover {
    background: #FAFAFA;
}

/* --- Filterable Table --- */
.table-filterable {
    width: 100%;
}

.table-filterable .table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
    background: white;
    gap: var(--space-md);
}

.table-filterable .table-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.table-filterable .table-actions {
    display: flex;
    gap: var(--space-xs);
}

/* Filter Row */
.filter-row th {
    padding: 12px 24px;
    background: #F8F8F8;
}

.filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-family: inherit;
    background: white;
    transition: var(--transition-fast);
}

.filter-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-default);
}

.filter-input::placeholder {
    color: var(--text-disabled);
}

/* Filter Select */
.filter-select {
    width: 100%;
    padding: 8px 28px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--brand-primary);
}

/* Sortable Headers */
.th-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.th-sortable:hover {
    background: #F0F0F0;
}

.th-sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-disabled);
    opacity: 0.5;
}

.th-sortable.asc::after {
    border-top: none;
    border-bottom: 5px solid var(--brand-primary);
    opacity: 1;
}

.th-sortable.desc::after {
    border-top: 5px solid var(--brand-primary);
    opacity: 1;
}

/* Table Footer / Pagination */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--border-color);
    background: #FAFAFA;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.table-footer-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.rows-per-page {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.rows-per-page select {
    padding: 6px 24px 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}

/* Checkbox in table */
.table-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--brand-primary);
}

/* Selected row */
tr.selected {
    background: rgba(var(--brand-primary-rgb), 0.05);
}

tr.selected td {
    border-bottom-color: rgba(var(--brand-primary-rgb), 0.1);
}

.accordion {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: white;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: 20px 24px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.accordion-content {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.accordion-item.active .accordion-content {
    padding: 0 24px 24px;
    max-height: 200px;
    opacity: 1;
}

/* --- Tooltip --- */
.tooltip-box {
    position: relative;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    margin-bottom: 8px;
}

.tooltip-box:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px);
}

/* ============================================
   LAYOUT SYSTEM - Gmail Style
   ============================================ */

/* --- App Shell --- */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}

/* --- Top Header --- */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 var(--space-sm);
    z-index: 100;
    gap: var(--space-sm);
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 240px;
}

.app-header-center {
    flex: 1;
    max-width: 720px;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-left: auto;
}

.app-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.menu-toggle:hover {
    background: #F0F0F0;
}

.menu-toggle i,
.menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

/* Search Bar in Header */
.header-search {
    display: flex;
    align-items: center;
    background: #F0F0F0;
    border-radius: var(--radius-pill);
    padding: 0 var(--space-sm);
    height: 48px;
    width: 100%;
    transition: var(--transition-fast);
}

.header-search:focus-within {
    background: white;
    box-shadow: var(--shadow-default);
}

.header-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    padding: 0 var(--space-xs);
    font-family: inherit;
}

.header-search i,
.header-search svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* Header Icon Buttons */
.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    position: relative;
}

.header-icon-btn:hover {
    background: #F0F0F0;
}

.header-icon-btn i,
.header-icon-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* Avatar */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

.avatar-sm {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
}

/* --- Sidebar (Gmail Style) --- */
.app-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 256px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: var(--space-sm) 0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 90;
}

/* Collapsed/Rail Mode */
.app-sidebar.collapsed {
    width: 72px;
}

.app-sidebar.collapsed .sidebar-nav-text,
.app-sidebar.collapsed .sidebar-section-title,
.app-sidebar.collapsed .sidebar-badge {
    display: none;
}

.app-sidebar.collapsed .sidebar-nav-item {
    padding: 14px;
    justify-content: center;
    margin: 2px 12px;
    gap: 0;
    border-radius: 4px;
}

.app-sidebar.collapsed .sidebar-nav-item i,
.app-sidebar.collapsed .sidebar-nav-item svg {
    margin: 0;
}

.app-sidebar.collapsed .sidebar-section {
    padding: var(--space-xs) 0;
}

/* Color dot labels stay visible but centered */
.app-sidebar.collapsed .sidebar-nav-item span[style*="border-radius: 50%"] {
    margin: 0;
}

/* Sidebar Navigation */
.sidebar-section {
    padding: var(--space-xs) 0;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: var(--space-sm) var(--space-md) var(--space-xs);
    letter-spacing: 0.05em;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 0 8px;
    border-radius: var(--radius-pill);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav-item i,
.sidebar-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.sidebar-nav-item:hover {
    background: #F0F0F0;
}

.sidebar-nav-item.active {
    background: rgba(var(--brand-primary-rgb), 0.1);
    color: var(--brand-primary);
}

.sidebar-nav-item.active i,
.sidebar-nav-item.active svg {
    color: var(--brand-primary);
}

.sidebar-nav-text {
    transition: var(--transition-fast);
}

/* Sidebar Badge Count */
.sidebar-badge {
    margin-left: auto;
    background: var(--brand-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    min-width: 20px;
    text-align: center;
}

/* --- Main Content Area --- */
.app-main {
    flex: 1;
    margin-left: 256px;
    margin-top: 64px;
    padding: var(--space-lg);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: calc(100vh - 64px);
}

.app-sidebar.collapsed~.app-main,
.sidebar-collapsed .app-main {
    margin-left: 72px;
}

/* Page Header */
.page-header {
    margin-bottom: var(--space-lg);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: var(--space-xs);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

/* --- Mobile Overlay --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 80;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-default);
    }

    .app-main {
        margin-left: 0;
    }

    .sidebar-overlay {
        display: block;
    }

    .app-header-left {
        min-width: auto;
    }
}

@media (max-width: 640px) {
    .app-header-center {
        display: none;
    }

    .header-search-mobile {
        display: flex;
    }
}