/* ============================================================
   CEPSTOK AYRICALIKLI HİZMETLER — PREMIUM UNIFIED WHITE THEME
   Mobile-First, REM-based Fluid Layout (Shared App Aesthetic)
   Font: Sora (headings/logos) + Inter (body)
   ============================================================ */

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

/* ============================================================
   DESIGN TOKENS & SPACING SYSTEM
   ============================================================ */
:root {
    /* Colors - Core (Ultra Premium White & Light Gray) */
    --bg-deep:     #f4f7fb;  /* Slightly cooler, luxurious app background */
    --bg-base:     #ffffff;  /* Pure white */
    --bg-elevated: #ffffff;
    --bg-card:     #ffffff;
    --bg-input:    #f1f5f9;  /* Elegant input background */
    --bg-hover:    #f8fafc;

    /* Colors - Accents (Anthracite / Deep Navy & Subtle Gold) */
    --accent:         #0a192f;  /* Deep luxury navy/anthracite */
    --accent-light:   #1e293b;
    --accent-muted:   rgba(10, 25, 47, 0.05);
    --accent-gold:    #c5a059;  /* Very subtle, luxury champagne gold */

    /* Colors - Text */
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;

    /* Colors - Status (Pastel/Elegant Tones) */
    --success:     #059669;
    --success-bg:  rgba(5, 150, 105, 0.08);
    --warning:     #d97706;
    --warning-bg:  rgba(217, 119, 6, 0.08);
    --danger:      #e11d48; /* Elegant Ruby Red */
    --danger-bg:   rgba(225, 29, 72, 0.08);
    --info:        #2563eb;
    --info-bg:     rgba(37, 99, 235, 0.08);

    /* Borders */
    --border:        #e2e8f0;
    --border-subtle: #f1f5f9;

    /* Shadows (Soft, Apple-like, Diffused) */
    --shadow-sm:   0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-card: 0 12px 36px -12px rgba(15, 23, 42, 0.08);
    --shadow-lg:   0 24px 48px -12px rgba(15, 23, 42, 0.1);
    --shadow-btn:  0 4px 14px 0 rgba(10, 25, 47, 0.2);

    /* Spacing System (1rem = 16px) */
    --space-xs:  0.25rem;  /* 4px  */
    --space-sm:  0.5rem;   /* 8px  */
    --space-md:  1rem;     /* 16px */
    --space-lg:  1.5rem;   /* 24px */
    --space-xl:  2rem;     /* 32px */
    --space-2xl: 3rem;     /* 48px */

    /* Sizing System */
    --sidebar-w: 16.5rem;  /* 264px */
    --topbar-h:  4.5rem;   /* 72px */
    
    /* Button Heights (Ergonomic Thumb-Zone) */
    --btn-h: 3rem;         /* 48px */
    --btn-sm-h: 2.25rem;   /* 36px */

    /* Border Radius (Refined Apple-like curves) */
    --radius-sm: 0.5rem;   /* 8px  */
    --radius-md: 0.75rem;  /* 12px */
    --radius-lg: 1.25rem;  /* 20px */
    --radius-xl: 1.75rem;  /* 28px */

    /* Transitions */
    --ease: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    overscroll-behavior: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem; /* Rule 2.1: Mobil (15.2px) */
    background: var(--bg-deep);
    color: var(--text-primary);
    overflow-x: hidden;
    overscroll-behavior: none;
    height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
}

/* ============================================================
   LUXURY BRANDING (UBER & CEPSTOK) - THE LOCKUP
   ============================================================ */
.luxury-logo-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    position: relative;
}
.luxury-logo-text {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 2.75rem;
    letter-spacing: -0.05em;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 12px rgba(10, 25, 47, 0.1);
}

.luxury-logo-wrap::after {
    display: none;
}

.luxury-logo-sub {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1.125rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-gold);
    text-align: center;
    margin-top: 4px;
}

/* Small Sidebar Branding */
.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-xl) var(--space-md) var(--space-md);
    position: relative;
}

.luxury-logo-text-sm {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.05em;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.brand::after {
    display: none;
}

.luxury-logo-sub-sm {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-style: italic;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-gold);
    white-space: nowrap;
    margin-top: 2px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 0.25rem; height: 0.25rem; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 1rem; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   BUTTONS (Premium Interactive)
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0 var(--space-lg);
    height: var(--btn-h);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--ease);
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    outline: none;
    line-height: 1;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: var(--shadow-btn);
}
.btn-primary:hover { 
    transform: translateY(-2px);
    background: var(--accent-light); 
    box-shadow: 0 8px 24px rgba(10, 25, 47, 0.25); 
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--bg-base);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { 
    background: var(--bg-hover); 
    border-color: #cbd5e1;
}

.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }

.btn-success { background: var(--success-bg); color: var(--success); }

.btn-sm {
    height: var(--btn-sm-h);
    padding: 0 var(--space-md);
    font-size: 0.75rem; /* 12px */
    border-radius: var(--radius-sm);
}

.btn-block { width: 100%; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: var(--btn-h);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem; /* Readability on mobile */
    outline: none;
    transition: var(--ease);
}

.form-group textarea {
    min-height: 6rem;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: var(--bg-base);
    box-shadow: 0 0 0 4px var(--accent-muted);
}
.input-tip { font-size: 0.6875rem; color: var(--text-muted); }

/* ============================================================
   AUTH SCREEN (Shared Login/Register App-like Flow)
   ============================================================ */
.auth-wrapper {
    width: 100%;
    max-width: 28rem;
    margin: auto;
    padding: var(--space-xl) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.brand-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 0.375rem;
    gap: 0.25rem;
}

.auth-tab-btn {
    flex: 1;
    padding: var(--space-sm);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--ease);
}

.auth-tab-btn.active {
    background: var(--bg-base);
    color: var(--text-primary);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* Card */
.auth-card, .login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-lg);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

/* ============================================================
   APP CONTAINER (MOBILE FIRST)
   ============================================================ */
.app-container, .dashboard-wrapper {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background: var(--bg-deep); /* Ensure deep bg on body */
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 47, 0.4);
    backdrop-filter: blur(4px);
    z-index: 699;
    display: none;
}
.sidebar-backdrop.active { display: block; }

/* Sidebar */
.sidebar, .customer-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg-base);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 700;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
}

.sidebar.open, .customer-sidebar.open {
    transform: translateX(0);
}

/* Menu */
.menu, .customer-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
    padding: var(--space-sm) var(--space-md);
    overflow-y: auto;
}

.menu-item, .customer-menu-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0 var(--space-md);
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-height: var(--btn-h);
    transition: var(--ease);
}

.menu-item .menu-icon, .customer-menu-item .menu-icon { 
    font-size: 1.125rem; 
    width: 1.5rem; 
    text-align: center; 
    flex-shrink: 0; 
    filter: grayscale(100%) opacity(0.6);
    transition: var(--ease);
}
.menu-item:hover, .customer-menu-item:hover { 
    color: var(--text-primary); 
    background: var(--bg-hover); 
}
.menu-item.active, .customer-menu-item.active { 
    color: var(--text-primary); 
    background: var(--bg-input); 
    font-weight: 700; 
}
.menu-item.active .menu-icon, .customer-menu-item.active .menu-icon { 
    filter: grayscale(0%) opacity(1); 
}

.menu-section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-lg) var(--space-sm) var(--space-xs);
}

/* Sidebar Extras */
.bot-status-card {
    margin: var(--space-md);
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}
.customer-sidebar-wallet {
    margin: var(--space-md);
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}
.wallet-label { font-size: 0.6875rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing:0.05em; margin-bottom: 0.25rem; display: block; font-weight:600;}
.customer-sidebar-wallet h3 { font-size: 1.5rem; color: var(--accent); }

.customer-logout-btn {
    margin: 0 var(--space-md) var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    height: var(--btn-h);
    background: var(--danger-bg);
    color: var(--danger);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.main-content, .customer-main-content {
    flex-grow: 1;
    overflow-y: auto;
    background: var(--bg-deep);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Top Bar */
.admin-topbar, .customer-topbar {
    height: var(--topbar-h);
    min-height: var(--topbar-h);
    background: var(--bg-base);
    border-bottom: 1px solid var(--border);
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: var(--space-sm); }
.topbar-right { display: flex; align-items: center; gap: var(--space-sm); }

.hamburger-btn, .hamburger-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    width: var(--btn-h);
    height: var(--btn-h);
    cursor: pointer;
}

.topbar-title, .topbar-title h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Profile / Actions in Topbar */
.topbar-profile { display: flex; align-items: center; gap: var(--space-sm); }
.topbar-balance { display: none; flex-direction: column; align-items: flex-end; }
.topbar-balance span { font-size: 0.6875rem; color: var(--text-secondary); font-weight: 600;}
.topbar-balance strong { font-size: 0.875rem; color: var(--accent); font-weight: 700; }

.topbar-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--bg-input);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 1px solid var(--border);
}

/* Content Pad */
.content-pad, .customer-content-area {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    flex-grow: 1;
    width: 100%;
}

.tab-content { display: none; flex-direction: column; gap: var(--space-lg); }
.tab-content.active { display: flex; }

/* ============================================================
   CARDS (Luxury Apple-like layout)
   ============================================================ */
.card {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-md);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.card-header h2 { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); }
.card-header p { font-size: 0.875rem; color: var(--text-secondary); }

/* Grid Layouts */
.metrics-grid, .customer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
}

.metric-card {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.metric-icon {
    font-size: 1.5rem;
    background: var(--bg-input);
    width: 3rem;
    height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.metric-info h3 { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.25rem; }
.metric-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1; }

/* Elegant text colors for specific metrics */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-gold { color: var(--info) !important; }

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    font-size: 0.875rem;
}

.table th, .table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td { color: var(--text-primary); font-weight: 500; }
.table th {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-muted   { background: var(--bg-input);   color: var(--text-secondary); border: 1px solid var(--border); }

/* ============================================================
   MODALS & CHAT
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 47, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: var(--space-md);
}
.modal.active { opacity: 1; pointer-events: auto; }

.modal-content {
    background: var(--bg-base);
    border: none;
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-lg);
    width: 100%;
    max-width: 28rem;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 2.25rem;
    height: 2.25rem;
    background: var(--bg-input);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--ease);
}
.modal-close:hover { background: #e2e8f0; color: var(--text-primary); }

.chat-panel-overlay { position: fixed; inset: 0; background: rgba(10, 25, 47, 0.2); z-index: 800; display: none; }
.chat-panel-overlay.active { display: block; }

.chat-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 26rem; 
    background: var(--bg-base);
    border-left: 1px solid var(--border);
    z-index: 801;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.chat-panel.active { transform: translateX(0); }

.chat-panel-header, .chat-header {
    padding: var(--space-lg) var(--space-md);
    border-bottom: 1px solid var(--border);
    background: var(--bg-base);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages, .chat-messages-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    background: var(--bg-deep);
}

.chat-msg { max-width: 85%; display: flex; flex-direction: column; gap: 0.25rem; }
.chat-msg.admin, .chat-msg.sent { align-self: flex-end; align-items: flex-end; }
.chat-msg.customer, .chat-msg.received { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    word-break: break-word;
    box-shadow: var(--shadow-sm);
}

.chat-msg.admin .chat-bubble, .chat-msg.sent .chat-bubble { 
    background: var(--accent); color: white; border-bottom-right-radius: 0.25rem; 
}
.chat-msg.customer .chat-bubble, .chat-msg.received .chat-bubble { 
    background: var(--bg-base); border: 1px solid var(--border); color: var(--text-primary); border-bottom-left-radius: 0.25rem; 
}

.chat-input-area, .chat-input-row {
    padding: var(--space-md);
    border-top: 1px solid var(--border);
    background: var(--bg-base);
    display: flex;
    gap: var(--space-sm);
}

.chat-input-area textarea, .chat-input-row textarea {
    flex-grow: 1;
    min-height: var(--btn-h);
    max-height: 6rem;
    resize: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}
.chat-input-area textarea:focus, .chat-input-row textarea:focus { border-color: var(--accent); }

/* ============================================================
   LIVE RIDE TRACKING VIEWS
   ============================================================ */
.track-stages {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin: var(--space-md) 0 var(--space-lg) 0;
    padding-left: var(--space-sm);
    position: relative;
}

.track-stages::before {
    content: '';
    position: absolute;
    left: calc(var(--space-sm) + 6px);
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: var(--border);
    z-index: 1;
}

.track-stage {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: relative;
    z-index: 2;
}

.track-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 2px solid var(--text-muted);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.track-stage.done .track-dot {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.track-stage.active .track-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
    animation: pulse-dot 1.5s infinite;
}

.track-stage.pending {
    opacity: 0.5;
}

.track-stage span:last-child {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.track-stage.active span:last-child {
    color: var(--accent);
    font-weight: 600;
}

.track-stage.done span:last-child {
    color: var(--success);
}

.track-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.track-details > div {
    font-size: 0.8125rem;
    line-height: 1.4;
}

.track-details > div span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.track-details > div strong {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.track-details .full {
    grid-column: span 1;
    padding-top: var(--space-xs);
    border-top: 1px dashed var(--border);
    margin-top: var(--space-xs);
}

@keyframes pulse-dot {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* ============================================================
   LOG CONSOLE
   ============================================================ */
.log-console {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8125rem;
    color: var(--text-primary);
    height: 16rem;
    overflow-y: auto;
}

/* Utils */
.hidden { display: none !important; }
.result-msg, .auth-message { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); font-size: 0.875rem; margin-top: var(--space-sm);}
.result-msg.success, .auth-message.success { background: var(--success-bg); color: var(--success); }
.result-msg.error, .auth-message.error { background: var(--danger-bg); color: var(--danger); }
.section-divider { border-top: 1px solid var(--border); margin: var(--space-md) 0; }

.loader {
    width: 1.25rem; height: 1.25rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   APP FOOTER (WATERMARK)
   ============================================================ */
.app-footer {
    padding: var(--space-lg);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-top: auto;
}

/* ============================================================
   NOTIFICATION BELL, DROPDOWN & BANK DETAILS
   ============================================================ */

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.topbar-user {
    display: none;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.topbar-user strong {
    color: var(--text-primary);
    font-weight: 600;
}

.notification-bell-container {
    position: relative;
    display: inline-block;
}

.bell-btn {
    padding: 10px 12px;
    font-size: 1.125rem;
    position: relative;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border);
    transition: var(--ease);
    cursor: pointer;
}

.bell-btn:hover {
    background: var(--border-subtle);
    border-color: var(--text-muted);
}

.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    padding: 2px 5px;
    font-size: 0.5625rem; /* 9px */
    border-radius: 10px;
    min-width: 1rem;
    text-align: center;
    line-height: 1.4;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(225, 29, 72, 0.2);
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 400px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-dropdown.hidden {
    display: none !important;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-hover);
}

.dropdown-header h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.dropdown-header button {
    min-height: 1.75rem;
    font-size: 0.6875rem;
    padding: var(--space-xs) var(--space-sm);
}

.notifications-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.notifications-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: var(--space-lg);
}

/* Notification Item */
.notification-item {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--ease);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-hover);
}

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

.notification-item.unread {
    background: rgba(10, 25, 47, 0.02);
    border-left: 3px solid var(--accent);
    padding-left: calc(var(--space-md) - 3px);
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
}

.notification-item-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.notification-item-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-top: 2px;
}

.notification-item-content {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Bank Details Card */
.bank-details-card {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.bank-detail-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: var(--space-sm) 0;
    font-size: 0.8125rem;
    border-bottom: 1px dashed var(--border-subtle);
}

.bank-detail-item:last-of-type {
    border-bottom: none;
}

.bank-detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.bank-detail-value {
    color: var(--text-primary);
    font-weight: 700;
    text-align: left;
    width: 100%;
}

.bank-detail-value.iban-value {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: var(--info);
    cursor: pointer;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    background: var(--bg-input);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--ease);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    user-select: all;
    width: 100%;
}

.bank-detail-value.iban-value:hover {
    background: var(--border-subtle);
    border-color: var(--text-muted);
}

.iban-copy-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.copy-badge {
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--ease);
    opacity: 0.7;
    user-select: none;
}
.copy-badge:hover {
    transform: scale(1.1);
    opacity: 1;
}

.bank-details-note {
    margin-top: var(--space-xs);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--warning);
    font-weight: 600;
    line-height: 1.4;
}

.modal-content-wide {
    max-width: 36rem !important;
}

/* Custom scroll for notifications */
.notifications-list::-webkit-scrollbar {
    width: 6px;
}
.notifications-list::-webkit-scrollbar-track {
    background: transparent;
}
.notifications-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Mobile-First Default Layout Rules (Mobile & Small Viewports) */
.notifications-dropdown {
    position: fixed;
    top: calc(var(--topbar-h) + 8px);
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);
    max-width: none;
    max-height: calc(100vh - var(--topbar-h) - 40px);
    box-shadow: 0 16px 40px rgba(10, 25, 47, 0.15);
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notifications-list {
    max-height: 300px;
}

.iban-copy-wrapper {
    width: 100%;
}

/* Wallet Form Optimization on Mobile */
#payment-request-form {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    box-sizing: border-box;
}

.customer-content-area {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.app-footer {
    margin-top: var(--space-xl) !important;
    margin-bottom: var(--space-sm) !important;
    flex-shrink: 0;
}

/* Horizontal scrollbars for mobile tables */
.table-responsive {
    overflow-x: auto;
    display: block;
    width: 100%;
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.table-responsive::-webkit-scrollbar {
    height: 6px;
    display: block;
}
.table-responsive::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
.table-responsive::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.guide-modal-content {
    max-width: 95% !important;
    max-height: 80vh !important; /* Slightly smaller on small screens for better viewport fit */
    padding: var(--space-lg) var(--space-md) !important;
    margin: 10px;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important; /* Prevent double scrollbars on the parent container */
}

.guide-modal-scroll {
    flex: 1 !important;
    overflow-y: auto !important;
    padding-right: 6px;
    margin-top: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    word-break: break-word;
    -webkit-overflow-scrolling: touch; /* Momentum scrolling on iOS */
}

/* Custom Scrollbar for Guide Modal Body */
.guide-modal-scroll::-webkit-scrollbar {
    width: 6px;
}
.guide-modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.guide-modal-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
.guide-modal-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

#guide-modal-body h1, #guide-modal-body h2, #guide-modal-body h3 {
    font-family: 'Sora', sans-serif;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--accent);
    font-weight: 700;
}
#guide-modal-body h1 { font-size: 1.4rem; border-bottom: 2px solid var(--border-subtle); padding-bottom: 8px; margin-top: var(--space-md); }
#guide-modal-body h2 { font-size: 1.2rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 4px; }
#guide-modal-body h3 { font-size: 1.1rem; }
#guide-modal-body p { margin-bottom: var(--space-md); }
#guide-modal-body ul, #guide-modal-body ol { margin-bottom: var(--space-md); padding-left: var(--space-lg); }
#guide-modal-body li { margin-bottom: var(--space-xs); }
#guide-modal-body strong { font-weight: 600; color: var(--accent); }
#guide-modal-body blockquote {
    background: var(--bg-input);
    border-left: 4px solid var(--accent-gold);
    padding: var(--space-sm) var(--space-md);
    margin: var(--space-md) 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}
#guide-modal-body code {
    font-family: SFMono-Regular, Consolas, Courier, monospace;
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--danger);
}
#guide-modal-body hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: var(--space-lg) 0;
}

/* ============================================================
   RESPONSIVE OVERRIDES (Mobile-First Viewport Transition)
   ============================================================ */
@media (min-width: 640px) {
    .topbar-user {
        display: block;
    }
    
    .notifications-dropdown {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: 320px;
        left: auto;
        max-width: none;
        max-height: 400px;
        box-shadow: var(--shadow-lg);
    }
    
    .notifications-list {
        max-height: 330px;
    }
    
    .bank-detail-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        padding: var(--space-xs) 0;
    }
    
    .bank-detail-value {
        text-align: right;
        width: auto;
    }
    
    .bank-detail-value.iban-value {
        width: auto;
        justify-content: flex-start;
        font-size: 0.8125rem;
        padding: 6px 12px;
        display: inline-flex;
    }
    
    .iban-copy-wrapper {
        width: auto;
        display: inline-flex;
    }
    
    .track-details {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .track-details .full {
        grid-column: span 2;
    }
    
    .guide-modal-content {
        max-width: 50rem !important;
        max-height: 85vh !important;
        padding: var(--space-xl) !important;
        margin: 0;
    }
    
    .guide-modal-scroll {
        padding-right: 12px;
    }
}

@media (min-width: 768px) {
    /* Layout */
    .app-container, .dashboard-wrapper { flex-direction: row; }
    
    .sidebar, .customer-sidebar {
        position: static;
        transform: translateX(0);
        box-shadow: none;
    }
    
    .sidebar-backdrop { display: none !important; }
    .hamburger-btn, .hamburger-menu-btn { display: none; }
    .topbar-balance { display: flex; }

    /* TRENDYOL STYLE PC GRID CONSTRAINT */
    /* Instead of letting forms stretch to 1400px, constrain the main content area gracefully */
    .content-pad, .customer-content-area { 
        padding: var(--space-xl); 
        max-width: 1100px; /* Elegant, constrained desktop width */
        margin: 0 auto; 
    }
    
    .card { padding: var(--space-xl); }
    .card-header { flex-direction: row; align-items: center; justify-content: space-between; margin-bottom: var(--space-xl); }
    .card-header div { flex-grow: 1; }

    /* Graceful Grid for Desktop */
    .metrics-grid { grid-template-columns: repeat(4, 1fr); }
    
    /* 2 Columns: Forms on the left (narrower), tables on the right (wider) */
    .customer-grid { 
        grid-template-columns: minmax(300px, 380px) 1fr; 
        align-items: start; 
        gap: var(--space-xl); 
    }
    
    .app-footer {
        margin-top: auto !important;
        margin-bottom: 0 !important;
        flex-shrink: 1;
    }

    /* Rule 2.2: PC'de form elemanlarını max-width ile sınırla (kibarlaştır) */
    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-group .btn,
    form .btn {
        max-width: 400px;
    }
}

@media (min-width: 1024px) {
    /* Slightly wider for very large screens, but still constrained */
    .content-pad, .customer-content-area { 
        max-width: 1200px; 
    }
    
    body {
        font-size: 1.125rem; /* Rule 2.1: PC (18px) */
    }

    .lg\:text-5xl {
        font-size: 3.5rem;
        line-height: 1.2;
    }

    .lg\:text-lg {
        font-size: 1.125rem;
        line-height: 1.75rem;
    }
}

/* ============================================================
   TAILWIND-LIKE UTILITY BREAKPOINT CLASSES (Mobile-First)
   ============================================================ */
.grid {
    display: grid;
}
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}
.gap-4 {
    gap: 1rem;
}
.gap-6 {
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .sm\:bottom-6 {
        bottom: 1.5rem;
    }
    .sm\:right-6 {
        right: 1.5rem;
    }
    .sm\:block {
        display: block;
    }
    .sm\:inline {
        display: inline;
    }
    .sm\:inline-flex {
        display: inline-flex;
    }
    .sm\:h-\[280px\] {
        height: 280px;
    }
    .sm\:h-\[320px\] {
        height: 320px;
    }
    .sm\:w-auto {
        width: auto;
    }
    .sm\:min-w-\[200px\] {
        min-width: 200px;
    }
    .sm\:min-w-\[240px\] {
        min-width: 240px;
    }
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .sm\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .sm\:flex-row {
        flex-direction: row;
    }
    .sm\:items-center {
        align-items: center;
    }
    .sm\:justify-between {
        justify-content: space-between;
    }
    .sm\:gap-2 {
        gap: 0.5rem;
    }
    .sm\:gap-3 {
        gap: 0.75rem;
    }
    .sm\:gap-4 {
        gap: 1rem;
    }
    .sm\:space-y-8>:not([hidden])~:not([hidden]) {
        --tw-space-y-reverse: 0;
        margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));
        margin-bottom: calc(2rem * var(--tw-space-y-reverse));
    }
    .sm\:p-12 {
        padding: 3rem;
    }
    .sm\:p-4 {
        padding: 1rem;
    }
    .sm\:p-5 {
        padding: 1.25rem;
    }
    .sm\:p-6 {
        padding: 1.5rem;
    }
    .sm\:p-8 {
        padding: 2rem;
    }
    .sm\:px-3 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .sm\:px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .sm\:py-8 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    .sm\:text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    .sm\:text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    .sm\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
    .sm\:text-base {
        font-size: 1rem;
        line-height: 1.5rem;
    }
    .sm\:text-lg {
        font-size: 1.125rem;
        line-height: 1.75rem;
    }
    .sm\:text-sm {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }
    .md\:hidden {
        display: none;
    }
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .md\:grid-cols-7 {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    .lg\:inline {
        display: inline;
    }
    .lg\:table-cell {
        display: table-cell;
    }
    .lg\:w-60 {
        width: 15rem;
    }
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .lg\:flex-row {
        flex-direction: row;
    }
    .lg\:text-5xl {
        font-size: 3.5rem !important;
        line-height: 1;
    }
    .lg\:text-lg {
        font-size: 1.125rem !important;
        line-height: 1.75rem;
    }
}

