/* ============================================
   SAAT YÖNETİM PANELİ - BLACK LIQUID THEME
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-base:        #000000;
    --bg-surface:     #0a0a0a;
    --bg-card:        #0d0d0d;
    --bg-elevated:    #141414;
    --bg-hover:       #1a1a1a;
    --border:         rgba(255,255,255,0.08);
    --border-strong:  rgba(255,255,255,0.15);
    --text-primary:   #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted:     #555555;
    --accent:         #ffffff;
    --accent-dim:     rgba(255,255,255,0.1);
    --blue:           #3b82f6;
    --green:          #10b981;
    --purple:         #8b5cf6;
    --orange:         #f59e0b;
    --red:            #ef4444;
    --sidebar-width:  260px;
    --header-height:  64px;
    --radius:         12px;
    --radius-sm:      8px;
    --shadow:         0 4px 24px rgba(0,0,0,0.6);
    --shadow-lg:      0 8px 40px rgba(0,0,0,0.8);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ============================================
   HEADER
   ============================================ */
.top-header {
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sidebar-toggle:hover {
    background: var(--accent-dim);
    color: var(--text-primary);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    text-align: right;
}

.user-info.mobile-hidden {
    display: block;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.user-role {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 149;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 150;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.nav-item:hover svg {
    opacity: 1;
}

.nav-item.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}

.nav-item.active svg {
    opacity: 1;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--text-primary);
    border-radius: 0 3px 3px 0;
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 4px;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.main-container {
    margin-top: var(--header-height);
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

.sidebar.collapsed ~ .main-container,
.main-container.expanded {
    margin-left: 0;
}

.content {
    padding: 28px;
    max-width: 1400px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.page-header p strong {
    color: var(--text-secondary);
}

/* ============================================
   CARDS - LIQUID GLASS EFFECT
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: var(--border-strong);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.card-body {
    padding: 24px;
}

/* ============================================
   STAT CARDS - LIQUID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top left, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
}

.stat-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.stat-icon.blue   { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.stat-icon.green  { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.2); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }

.stat-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
    flex: 1;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
    letter-spacing: 0.1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select option {
    background: #1a1a1a;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
    background: var(--bg-hover);
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

/* ============================================
   FILE UPLOAD
   ============================================ */
.file-upload-area {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: var(--bg-elevated);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: rgba(255,255,255,0.3);
    background: var(--bg-hover);
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.file-upload-placeholder svg {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.file-upload-placeholder p {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 14px;
}

.file-upload-placeholder span {
    color: var(--text-muted);
    font-size: 12px;
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

.file-upload-area.has-image {
    padding: 20px;
}

.file-upload-area.has-image .file-upload-placeholder {
    display: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-primary {
    background: var(--text-primary);
    color: #000000;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--accent-dim);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
}

.btn-danger:hover {
    background: rgba(239,68,68,0.25);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* ============================================
   TABLE
   ============================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table thead {
    background: var(--bg-elevated);
}

.table th {
    padding: 11px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: var(--bg-elevated);
}

.watch-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.watch-thumb-placeholder {
    width: 44px;
    height: 44px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-blue    { background: rgba(59,130,246,0.12);  color: #60a5fa;  border: 1px solid rgba(59,130,246,0.2); }
.badge-green   { background: rgba(16,185,129,0.12);  color: #34d399;  border: 1px solid rgba(16,185,129,0.2); }
.badge-red     { background: rgba(239,68,68,0.12);   color: #f87171;  border: 1px solid rgba(239,68,68,0.2); }
.badge-gray    { background: rgba(255,255,255,0.07); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-purple  { background: rgba(139,92,246,0.12);  color: #a78bfa;  border: 1px solid rgba(139,92,246,0.2); }
.badge-orange  { background: rgba(245,158,11,0.12);  color: #fbbf24;  border: 1px solid rgba(245,158,11,0.2); }
.badge-info    { background: rgba(59,130,246,0.12);  color: #60a5fa;  border: 1px solid rgba(59,130,246,0.2); }
.badge-warning { background: rgba(251,146,60,0.12);  color: #fb923c;  border: 1px solid rgba(251,146,60,0.2); }

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.alert-success {
    background: rgba(16,185,129,0.08);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.2);
}

.alert-error {
    background: rgba(239,68,68,0.08);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--accent-dim);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ============================================
   PERMISSIONS / CHECKBOXES
   ============================================ */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-elevated);
}

.checkbox-label:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    accent-color: var(--text-primary);
}

.checkbox-label span {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   DETAIL PAGE
   ============================================ */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
}

.detail-value {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    text-align: right;
}

.detail-value code {
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border: 1px solid var(--border);
}

/* ============================================
   COST SUMMARY
   ============================================ */
.cost-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
}

.cost-item.total {
    padding-top: 14px;
    border-top: 1px solid var(--border-strong);
    font-size: 15px;
    font-weight: 600;
}

.cost-item.profit {
    padding: 14px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.cost-item.profit.positive {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
}

.cost-item.profit.negative {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
}

.cost-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.cost-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.cost-value.secondary {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: 36px;
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -29px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-secondary);
    border: 2px solid var(--bg-surface);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 16px;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-content {
    background: var(--bg-elevated);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.timeline-notes {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 6px 0;
}

.timeline-meta {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 6px;
}

/* ============================================
   FILTER BUTTONS
   ============================================ */
.filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.filter-btn.active {
    background: var(--text-primary);
    color: #000000;
    border-color: transparent;
    font-weight: 600;
}

/* ============================================
   SEARCH INPUT (INLINE STYLE OVERRIDE)
   ============================================ */
input[type="number"],
input[type="text"],
input[type="password"],
input[type="email"] {
    color-scheme: dark;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
body.login-page {
    background: #000000 !important;
    background-color: #000000 !important;
    background-image: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.login-header h1 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.login-form .form-group {
    margin-bottom: 18px;
}

.login-form label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 7px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary) !important;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input:focus {
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

.login-form input::placeholder {
    color: var(--text-muted);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #141414 inset !important;
    box-shadow: 0 0 0px 1000px #141414 inset !important;
    border-color: var(--border) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.btn-primary.btn-block {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary.btn-block:hover {
    background: #e0e0e0;
}

/* ============================================
   RESPONSIVE - MOBILE FIRST
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {

    :root {
        --sidebar-width: 260px;
        --header-height: 60px;
    }

    /* Header */
    .top-header {
        padding: 0 16px;
    }

    .user-info {
        display: none;
    }

    /* Sidebar — off-canvas by default on mobile */
    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,0.8);
    }

    /* Main content — full width on mobile */
    .main-container {
        margin-left: 0 !important;
    }

    /* Content padding */
    .content {
        padding: 16px;
    }

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
        gap: 10px;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
    }

    .stat-info h3 {
        font-size: 16px;
    }

    .stat-info p {
        font-size: 10px;
    }

    /* Card */
    .card-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .card-body {
        padding: 16px;
    }

    /* Table */
    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* Form */
    .form-row {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Permissions */
    .permissions-grid {
        grid-template-columns: 1fr;
    }

    /* Login */
    .login-box {
        padding: 32px 24px;
    }

    /* Buttons */
    .btn {
        font-size: 13px;
    }

    /* Quick search form */
    .content form[action="watch_detail.php"] {
        flex-direction: column !important;
    }

    .content form[action="watch_detail.php"] .btn {
        width: 100%;
        justify-content: center;
    }

    /* Modal */
    .modal-content {
        width: 100%;
        max-height: 85vh;
    }

    /* Filter buttons wrap */
    .filter-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header-brand span {
        display: none;
    }
}
