/* =========================================
   ORDERWATCHER - MODERN TASARIM SİSTEMİ
   ========================================= */

   :root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* =========================================
   BASE STYLES & RESET
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   LAYOUT CONTAINERS
   ========================================= */
.container {
    max-width: 1200px;
    margin: 20px auto;
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-height: calc(100vh - 40px);
}

.main-content {
    padding: 30px;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* =========================================
   BUTTONS & INTERACTIVE ELEMENTS
   ========================================= */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-error {
    background: var(--error-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.logout-btn {
    background: #fef2f2;
    color: var(--error-color);
    border: 1px solid #fecaca;
}

.logout-btn:hover {
    background: #fee2e2;
}

/* =========================================
   CHAT LAYOUT & COMPONENTS
   ========================================= */
.chat-layout {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 65vh;
    min-height: 500px;
    background: var(--surface-color);
    box-shadow: var(--shadow-md);
}

/* User List Styles */
.user-chat-list {
    width: 320px;
    border-right: 1px solid var(--border-color);
    background: #f8fafc;
    display: flex;
    flex-direction: column;
}

.user-list-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
}

.user-list-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.user-list-content::-webkit-scrollbar {
    width: 5px;
}

.user-list-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.user-chat-item {
    padding: 14px 16px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.user-chat-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(3px);
}

.user-chat-item.active {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.user-email {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.user-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 8px;
    flex-shrink: 0;
}

.user-status.active {
    background: var(--success-color);
    box-shadow: 0 0 6px var(--success-color);
}

.user-status.inactive {
    background: var(--secondary-color);
}

.unread-indicator {
    width: 10px;
    height: 10px;
    background: var(--error-color);
    border-radius: 50%;
    margin-left: auto;
    margin-right: 8px;
    display: none;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-unread 1.5s infinite;
}

.unread-indicator.active {
    display: block;
}

@keyframes pulse-unread {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Chat Window Styles */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-with-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Message Bubbles - Premium Theme */
.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    font-size: 14.5px;
    position: relative;
    line-height: 1.4;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    animation: messageAppear 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bubble.customer {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message-bubble.admin {
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0;
    margin-bottom: 4px;
}

.message-timestamp, .message-bubble .timestamp {
    font-size: 11px;
    opacity: 0.6;
    align-self: flex-end;
    margin-top: 2px;
}

.message-bubble.customer .message-timestamp,
.message-bubble.customer .timestamp {
    color: var(--text-secondary);
}

.message-bubble.admin .message-timestamp,
.message-bubble.admin .timestamp {
    color: rgba(255, 255, 255, 0.85);
}

/* Chat Input */
.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--surface-color);
    display: flex;
    gap: 12px;
    align-items: center;
}

#admin-message-input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: #f8fafc;
    font-size: 14px;
    transition: all 0.2s ease;
}

#admin-message-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#admin-send-btn {
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

#admin-send-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* =========================================
   MÜŞTERİ PANELİ DÜZENİ (CUSTOMER PANEL)
   ========================================= */
.customer-panel-container {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    background: var(--surface-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 24px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.panel-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.panel-header div {
    display: flex;
    align-items: center;
    gap: 15px;
}

#customer-email {
    font-weight: 600;
    color: var(--text-primary);
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.panel-main {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
    padding: 24px;
    flex: 1;
    background: #f8fafc;
    overflow: hidden;
}

.order-history-section, .chat-section {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.order-history-section h2, .chat-section h2 {
    font-size: 1.15rem;
    font-weight: 650;
    color: var(--text-primary);
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Order Form styling inside Order History Section */
.new-order-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    flex-shrink: 0;
}

#order-history-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#order-history-list::-webkit-scrollbar,
#chat-messages-customer::-webkit-scrollbar {
    width: 5px;
}

#order-history-list::-webkit-scrollbar-thumb,
#chat-messages-customer::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#order-history-list li {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#order-history-list li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

#order-history-list li button {
    margin-top: 8px;
    width: 100%;
    padding: 8px 12px;
    font-size: 12.5px;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

#order-history-list li button:hover {
    background: var(--primary-color);
    color: white;
}

.chat-section {
    height: 100%;
}

#chat-messages-customer {
    flex: 1;
    overflow-y: auto;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.chat-section .chat-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.chat-section .chat-input input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: #f8fafc;
    font-size: 14px;
    transition: all 0.2s ease;
}

.chat-section .chat-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.chat-section .chat-input button {
    width: auto;
    padding: 0 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.chat-section .chat-input button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.courier-call {
    border-top: 1px dashed var(--border-color);
    padding-top: 15px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

#call-courier-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--error-color), #b91c1c);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

/* Bottom Navigation Bar for Mobile */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    flex-shrink: 0;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    height: 100%;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 18px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item:focus {
    outline: none;
}

/* Responsive Overrides for Customer Panel */
@media (max-width: 900px) {
    .customer-panel-container {
        height: 100vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .panel-main {
        grid-template-columns: 1fr;
        height: calc(100vh - 140px); /* 100vh - header (75px) - bottom nav (65px) */
        overflow: hidden;
        padding: 15px;
        flex: 1;
    }
    
    .panel-col {
        display: none;
        height: 100%;
        overflow: hidden;
    }
    
    .panel-col.active {
        display: flex;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    /* Make sure chat messages expand fully in mobile tab container */
    #chat-messages-customer {
        max-height: none;
        flex: 1;
    }
}

#call-courier-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4);
}

#no-chat-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

/* =========================================
   ORDERWATCHER SPECIFIC COMPONENTS
   ========================================= */

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface-color);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-card p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Orders List */
.orders-section {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.section-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orders-list {
    max-height: 400px;
    overflow-y: auto;
}

.order-item {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.order-item:hover {
    background: #f8fafc;
}

.order-item:last-child {
    border-bottom: none;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-id {
    font-weight: 600;
    color: var(--text-primary);
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.pending {
    background: #fef3c7;
    color: #d97706;
}

.order-status.processing {
    background: #dbeafe;
    color: var(--primary-color);
}

.order-status.completed {
    background: #d1fae5;
    color: var(--success-color);
}

.order-status.cancelled {
    background: #fee2e2;
    color: var(--error-color);
}

.order-details {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 15px;
}

.order-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Activity Feed */
.activity-feed {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.activity-item {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin-bottom: 4px;
    color: var(--text-primary);
}

.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* =========================================
   AUTH PAGES STYLES
   ========================================= */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin: 0 auto 16px;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.password-strength {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.password-strength.very-weak { color: var(--error-color); }
.password-strength.weak { color: #f59e0b; }
.password-strength.medium { color: #f59e0b; }
.password-strength.strong { color: var(--success-color); }
.password-strength.very-strong { color: var(--success-color); }

/* =========================================
   ALERTS & NOTIFICATIONS
   ========================================= */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: var(--radius-lg);
    }
    
    .main-content {
        padding: 20px;
    }
    
    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .chat-layout {
        flex-direction: column;
        height: auto;
    }
    
    .user-chat-list {
        width: 100%;
        height: 200px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .order-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .order-actions {
        justify-content: flex-start;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 1.25rem;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .chat-input-area {
        padding: 15px;
    }
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Eksik elementler için stil */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4299e1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.status-pending { color: #e53e3e; font-weight: bold; }
.status-processing { color: #dd6b20; font-weight: bold; }
.status-completed { color: #38a169; font-weight: bold; }

.no-orders {
    text-align: center;
    padding: 20px;
    color: #718096;
}

/* =========================================
   YÖNETİCİ PANELİ YENİ TASARIMI (ADMIN PANEL)
   ========================================= */

.admin-body {
    background: #f1f5f9;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-body .admin-container {
    max-width: 100% !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff;
    overflow: hidden;
}

.admin-body .header {
    height: 70px !important;
    padding: 15px 30px !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
    background: #ffffff !important;
}

.admin-body .chat-layout {
    flex: 1 !important;
    height: calc(100vh - 70px) !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    display: flex !important;
}

.admin-body .user-chat-list {
    width: 350px !important;
    height: 100% !important;
    border-right: 1px solid var(--border-color) !important;
    background: #f8fafc !important;
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
}

.admin-body #user-list {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 15px !important;
}

.admin-body .chat-window {
    flex: 1 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
}

.admin-body #chat-container {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.admin-body .chat-header {
    height: 60px !important;
    padding: 15px 20px !important;
    border-bottom: 1px solid var(--border-color) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 15px !important;
    background: #ffffff !important;
}

.admin-body .chat-header h4 {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

.admin-body .chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 20px !important;
    background: #f8fafc !important;
}

.admin-body .chat-input-area {
    height: 70px !important;
    padding: 15px 20px !important;
    border-top: 1px solid var(--border-color) !important;
    background: #ffffff !important;
}

/* Mobile Back Button */
.admin-back-btn {
    display: none !important;
    background: #f1f5f9 !important;
    border: none !important;
    font-size: 16px !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

.admin-back-btn:hover {
    background: #cbd5e1 !important;
}

/* Mobil Uyumlu Medya Sorguları */
@media (max-width: 900px) {
    .admin-body .header {
        padding: 15px 20px !important;
    }

    .admin-body .chat-layout {
        position: relative !important;
        overflow: hidden !important;
    }

    .admin-body .user-chat-list {
        width: 100% !important;
        display: block !important;
    }

    .admin-body .chat-window {
        position: absolute !important;
        top: 0 !important;
        left: 100% !important;
        width: 100% !important;
        height: 100% !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 10 !important;
        background: #ffffff !important;
    }

    .admin-body .chat-layout.chat-active .chat-window {
        transform: translateX(-100%) !important;
    }

    .admin-body .chat-layout.chat-active .user-chat-list {
        display: none !important;
    }

    .admin-back-btn {
        display: inline-flex !important;
    }
}

/* =========================================
   YÖNETİCİ PANELİ - KURYE YÖNETİMİ & ADRES ATAMA
   ========================================= */

.admin-body .courier-panel {
    width: 320px !important;
    height: 100% !important;
    border-left: 1px solid var(--border-color) !important;
    background: #f8fafc !important;
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 1;
}

.admin-body .courier-panel.hidden-panel {
    width: 0 !important;
    overflow: hidden !important;
    border-left: none !important;
    opacity: 0;
}

.courier-panel-header {
    height: 60px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.courier-panel-header h4 {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

.courier-panel-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.courier-panel-content .courier-list-container {
    flex: none;
    overflow-y: visible;
}

.courier-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.courier-list-container h5, .courier-assign-form h5 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.admin-courier-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    box-shadow: var(--shadow-sm);
}

.admin-courier-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
}

.admin-courier-status.active {
    background: var(--success-color);
    box-shadow: 0 0 6px var(--success-color);
}

.courier-assign-form {
    padding: 15px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    border-top: 1px solid var(--border-color);
}

.form-group-sm {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-sm label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group-sm input, .form-group-sm select, .form-group-sm textarea {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 13px;
    width: 100%;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.form-group-sm input:focus, .form-group-sm select:focus, .form-group-sm textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Quick assign button in message bubble */
.quick-assign-btn {
    align-self: flex-start;
    margin-top: 10px;
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.quick-assign-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Mobil Uyumlu Medya Sorguları */
@media (max-width: 900px) {
    .admin-body .courier-panel {
        position: absolute !important;
        top: 0 !important;
        right: -100% !important;
        width: 100% !important;
        height: 100% !important;
        border-left: none !important;
        z-index: 20 !important;
        opacity: 1 !important;
    }
    
    .admin-body .courier-panel.show-panel {
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
    }
}