/**
 * DRIVEBAY.NET — Custom Styles
 * Tailwind CSS CDN + custom utilities
 * Dark theme default, mobile-first, accessible.
 */

/* ------------------------------------------------------------------
   Tailwind directives (processed by CDN)
   ------------------------------------------------------------------ */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* ------------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------------ */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #60a5fa;
    --success: #22c55e;
    --success-bg: #14532d;
    --error: #ef4444;
    --error-bg: #7f1d1d;
    --warning: #f59e0b;
    --warning-bg: #78350f;
    --border-color: #475569;
    --border-hover: #3b82f6;
    --radius: 0.75rem;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* ------------------------------------------------------------------
   Base overrides
   ------------------------------------------------------------------ */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ------------------------------------------------------------------
   Dropzone
   ------------------------------------------------------------------ */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    background-color: var(--bg-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dropzone:hover {
    border-color: var(--border-hover);
    background-color: rgba(59, 130, 246, 0.05);
}

.dropzone.dragover {
    border-color: var(--accent);
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1.01);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* ------------------------------------------------------------------
   Progress Bar
   ------------------------------------------------------------------ */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: var(--bg-tertiary);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 9999px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

/* ------------------------------------------------------------------
   Modal
   ------------------------------------------------------------------ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 42rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

/* ------------------------------------------------------------------
   Forms / Inputs
   ------------------------------------------------------------------ */
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Checkbox styling */
.form-checkbox {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ------------------------------------------------------------------
   Spinner
   ------------------------------------------------------------------ */
.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ------------------------------------------------------------------
   Animations
   ------------------------------------------------------------------ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.shake {
    animation: shake 0.4s ease;
}

/* ------------------------------------------------------------------
   State Badges
   ------------------------------------------------------------------ */
.badge-success {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: var(--success-bg);
    color: var(--success);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-error {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: var(--error-bg);
    color: var(--error);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: var(--warning-bg);
    color: var(--warning);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 9999px;
}

/* ------------------------------------------------------------------
   Quota bar section
   ------------------------------------------------------------------ */
.quota-bar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
}

.quota-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    display: flex;
    justify-content: space-between;
}

/* ------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------ */
.site-nav {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--accent-light);
}

/* Language selector */
.lang-select {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    cursor: pointer;
    outline: none;
}

.lang-select:focus {
    border-color: var(--accent);
}

/* ------------------------------------------------------------------
   Advanced options (collapsible)
   ------------------------------------------------------------------ */
.advanced-options {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.advanced-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: var(--bg-secondary);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.advanced-header:hover {
    background-color: var(--bg-tertiary);
}

.advanced-body {
    padding: 1rem;
    background-color: var(--bg-primary);
    animation: slideUp 0.2s ease;
}

.advanced-body.collapsed {
    display: none;
}

.advanced-icon {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.advanced-icon.rotated {
    transform: rotate(180deg);
}

/* ------------------------------------------------------------------
   Copy button feedback
   ------------------------------------------------------------------ */
.copy-feedback {
    position: relative;
}

.copy-feedback::after {
    content: attr(data-copied);
    position: absolute;
    top: -1.75rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background-color: var(--success-bg);
    color: var(--success);
    font-size: 0.6875rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    animation: fadeIn 0.15s ease;
}

/* ------------------------------------------------------------------
   File metadata display
   ------------------------------------------------------------------ */
.file-meta {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.file-meta-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.file-meta-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.file-meta-value {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ------------------------------------------------------------------
   Voting buttons
   ------------------------------------------------------------------ */
.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

.vote-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.vote-btn.vote-up:hover {
    border-color: var(--success);
    color: var(--success);
}

.vote-btn.vote-down:hover {
    border-color: var(--error);
    color: var(--error);
}

/* ------------------------------------------------------------------
   FAQ accordion
   ------------------------------------------------------------------ */
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background-color: var(--bg-secondary);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background-color: var(--bg-tertiary);
}

.faq-answer {
    padding: 1rem 1.25rem;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    animation: slideUp 0.2s ease;
}

.faq-answer.collapsed {
    display: none;
}

.faq-icon {
    transition: transform 0.2s ease;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.faq-icon.rotated {
    transform: rotate(180deg);
}

/* ------------------------------------------------------------------
   Preview area (image/video)
   ------------------------------------------------------------------ */
.preview-container {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container img,
.preview-container video {
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
}

/* ------------------------------------------------------------------
   Utility / responsive
   ------------------------------------------------------------------ */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.code-block {
    font-family: 'Courier New', monospace;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--accent-light);
    word-break: break-all;
    user-select: all;
}

/* Hide honeypot field */
.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* Hidden state utility */
.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .modal-content {
        padding: 1.25rem;
        margin: 0.5rem;
    }

    .dropzone {
        padding: 2rem 1rem;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

/* ========================== */
/* 5. ADMIN PANEL             */
/* ========================== */

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-right: 1px solid #334155;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.admin-sidebar .sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #334155;
}
.admin-sidebar .sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
}
.admin-sidebar .sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid #334155;
}

/* Nawigacja */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #94a3b8;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: #e2e8f0;
}
.nav-item.active {
    background: rgba(59,130,246,0.1);
    color: #60a5fa;
    border-left-color: #60a5fa;
}
.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Główna treść */
.admin-main {
    margin-left: 250px;
    min-height: 100vh;
    padding: 1.5rem;
    background-color: #0f172a;
}

/* Zakładki */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

/* Kafelki statystyk (Dashboard) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}
.stat-card .stat-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.12;
    line-height: 1;
    pointer-events: none;
}
.stat-card .stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}
.stat-card .stat-label {
    font-size: 0.8125rem;
    opacity: 0.85;
    margin-top: 0.25rem;
    position: relative;
    z-index: 1;
}

/* Kolory kafelkow */
.stat-blue { background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); }
.stat-emerald { background: linear-gradient(135deg, #059669 0%, #065f46 100%); }
.stat-violet { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); }
.stat-amber { background: linear-gradient(135deg, #d97706 0%, #92400e 100%); }
.stat-red { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); }
.stat-orange { background: linear-gradient(135deg, #ea580c 0%, #9a3412 100%); }

/* Modal logowania */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}
.login-box {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    animation: slideUp 0.35s ease-out;
}
.login-box h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.25rem;
}
.login-box p {
    color: #94a3b8;
    font-size: 0.875rem;
}
.login-error {
    color: #f87171;
    font-size: 0.8125rem;
    padding: 0.5rem;
    background: rgba(220,38,38,0.1);
    border-radius: 0.375rem;
    border: 1px solid rgba(220,38,38,0.2);
}

/* Tabela danych */
.data-table-wrapper {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid #1e293b;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.data-table thead th {
    background: #1e293b;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    border-bottom: 1px solid #334155;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}
.data-table thead th:hover {
    color: #e2e8f0;
}
.data-table thead th[data-sort] .sort-arrow {
    margin-left: 0.25rem;
    font-size: 0.625rem;
    opacity: 0.7;
}
.data-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1e293b;
    color: #cbd5e1;
    vertical-align: middle;
}
.data-table tbody tr {
    transition: background-color 0.15s;
}
.data-table tbody tr:hover {
    background-color: rgba(255,255,255,0.025);
}
.data-table tbody tr:nth-child(even) {
    background-color: rgba(255,255,255,0.012);
}
.data-table tbody tr:nth-child(even):hover {
    background-color: rgba(255,255,255,0.03);
}

/* Pasek filtrów */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: rgba(30,41,59,0.5);
    border-radius: 0.5rem;
}
.filter-bar input[type="text"],
.filter-bar select {
    min-width: 180px;
}

/* Paginacja */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #1e293b;
}
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.pagination button {
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.15s;
    min-width: 36px;
}
.pagination button:hover:not(:disabled) {
    background: #334155;
    border-color: #475569;
}
.pagination button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.pagination button.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.pagination-info {
    color: #64748b;
    font-size: 0.8125rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.15rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-red { background: rgba(220,38,38,0.15); color: #f87171; border: 1px solid rgba(220,38,38,0.25); }
.badge-green { background: rgba(22,163,74,0.15); color: #4ade80; border: 1px solid rgba(22,163,74,0.25); }
.badge-yellow { background: rgba(217,119,6,0.15); color: #fbbf24; border: 1px solid rgba(217,119,6,0.25); }
.badge-blue { background: rgba(37,99,235,0.15); color: #60a5fa; border: 1px solid rgba(37,99,235,0.25); }
.badge-gray { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.25); }

/* Toast / Powiadomienia */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    animation: toastIn 0.3s ease-out;
    max-width: 420px;
    word-break: break-word;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toast.toast-out {
    animation: toastOut 0.3s ease-in forwards;
}
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
.toast-warning { background: #d97706; }
.toast-info { background: #2563eb; }

/* Ustawienia */
.settings-list {
    background: #1e293b;
    border-radius: 0.75rem;
    padding: 0.5rem 1.5rem;
    max-width: 640px;
}
.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #334155;
    gap: 1rem;
}
.settings-row:last-child {
    border-bottom: none;
}
.settings-label {
    font-weight: 500;
    color: #cbd5e1;
    font-size: 0.9375rem;
}
.settings-value {
    color: #94a3b8;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.875rem;
    background: #0f172a;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    border: 1px solid #334155;
}

/* Tytuly sekcji */
.section-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Spinner / Loading */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #334155;
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: #94a3b8;
}

/* Utility */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}
.hidden {
    display: none !important;
}

/* ========================== */
/* ANIMACJE                   */
/* ========================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================== */
/* RESPONSIVE                 */
/* ========================== */

@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #334155;
    }
    .admin-sidebar .sidebar-nav {
        display: flex;
        overflow-x: auto;
        gap: 0.25rem;
        padding: 0.25rem;
    }
    .admin-main {
        margin-left: 0;
        padding: 1rem;
    }
    .nav-item {
        display: inline-flex;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.5rem 0.875rem;
        white-space: nowrap;
    }
    .nav-item.active {
        border-left-color: transparent;
        border-bottom-color: #60a5fa;
    }
    .login-box {
        margin: 1rem;
        padding: 1.5rem;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .data-table-wrapper {
        font-size: 0.8125rem;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar input,
    .filter-bar select {
        min-width: 100%;
    }
    .pagination-bar {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    .toast {
        max-width: 100%;
    }
    .settings-list {
        padding: 0.5rem 1rem;
    }
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
}
