/* =========================================
   ROOT VARIABLES
========================================= */
:root {
    --bg: #f5f3ee;
    --panel: #ffffff;
    --soft: #f3efe8;
    --soft-2: #ebe3d7;
    --line: #e5ddd0;
    --text: #1d1d1d;
    --muted: #7d766e;
    --primary: #b89c72;
    --focus-ring: 0 0 0 3px rgba(29, 29, 29, 0.15);
    --shadow-sm: 0 8px 24px rgba(0,0,0,0.04);
    --shadow-md: 0 18px 40px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.dark-theme {
    --bg: #121212;
    --panel: #1e1e1e;
    --soft: #2c2c2c;
    --soft-2: #3a3a3a;
    --line: #333333;
    --text: #f5f3ee;
    --muted: #9ca3af;
}

/* =========================================
   RESET & BASE
========================================= */
* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    font-family: Inter, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* =========================================
   TOPBAR & ACTIONS
========================================= */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }

.topbar-actions {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
}

/* + Mygtukas */
.add-project-btn {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.add-project-btn:hover { transform: scale(1.05); filter: brightness(1.1); }

/* Tema jungtukas */
.theme-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    font-size: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.theme-toggle span { position: absolute; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }

.icon-sun { opacity: 0; transform: translateY(20px) rotate(45deg); }
.icon-moon { opacity: 1; transform: translateY(0) rotate(0); }
body.dark-theme .icon-sun { opacity: 1; transform: translateY(0) rotate(0); }
body.dark-theme .icon-moon { opacity: 0; transform: translateY(-20px) rotate(-45deg); }

/* =========================================
   PROJECT CARDS (SaaS Style)
========================================= */
.projects-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 24px; 
}

.project-card {
    background: var(--panel);
    /* Naudojame kintamąjį, kuris tavo CSS nustatytas šviesioje temoje kaip #e5ddd0, o tamsioje kaip #333 */
    border: 1px solid var(--line); 
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--primary);
    /* Naudojame tavo kintamąjį, kad glow efektas būtų suderintas */
    box-shadow: 0 0 20px rgba(184, 156, 114, 0.15); 
    transform: translateY(-6px);
}

.project-card:active {
    transform: translateY(-2px);
}

/* =========================================
   FILTERS & SIDEBAR
========================================= */
.category-filter {
    border: none;
    background: var(--soft);
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
}

.category-filter:hover {
    background: var(--soft-2);
    color: var(--text);
}

.category-filter.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(184, 156, 114, 0.25);
}

.sidebar-project.active {
    background: rgba(184, 156, 114, 0.15);
    border-left: 3px solid var(--primary);
    border-radius: 0 12px 12px 0;
}
/* =========================================
   RESET
========================================= */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Inter, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
}

/* =========================================
   APP LAYOUT
========================================= */
.admin-app {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
}

/* =========================================
   SIDEBAR
========================================= */
.sidebar {
    background: var(--panel);
    border-right: 1px solid var(--line);
    padding: 28px;
    overflow-y: auto;
}

.sidebar-logo {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.sidebar-section {
    margin-bottom: 34px;
}

.sidebar-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--muted);
    margin-bottom: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

/* =========================================
   FILTERS & NAVIGATION
========================================= */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-projects {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-project {
    background: transparent;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    border: none;   /* <--- svarbu */
}

.sidebar-project:hover {
    background: var(--soft);
    color: var(--text);
    transform: translateX(4px);
}

.sidebar-project.active {
    background: rgba(184, 156, 114, 0.15);
    border-left: 3px solid var(--primary);
    border-radius: 0 12px 12px 0;
}

/* =========================================
   MAIN CONTENT
========================================= */
.main-content {
    overflow-y: auto;
    padding: 34px 40px;
}

/* =========================================
   TOPBAR
========================================= */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
}

.topbar h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.topbar p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.add-project-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 20px;
    background: var(--text);
    color: white;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-project-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-md);
    background: #000;
}

.add-project-btn:active {
    transform: translateY(0) scale(0.95);
}

/* =========================================
   PROJECT GRID & CARDS
========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--panel);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0,0,0,0.08);
}

.project-card:active {
    transform: translateY(-2px);
}

.project-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--soft);
    position: relative;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-thumb img {
    transform: scale(1.05);
}

.project-card-body {
    padding: 18px 20px;
}

.project-card-body h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.project-card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

/* =========================================
   MODAL
========================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-box {
    width: min(1000px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--panel);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal.active .modal-box {
    transform: translateY(0);
}

/* =========================================
   MODAL HEADER
========================================= */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 34px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: var(--panel);
    backdrop-filter: blur(10px);
    z-index: 50;
}

.modal-kicker {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--muted);
    font-weight: 700;
}

.modal-header h2 {
    margin: 4px 0 0;
    font-size: 22px;
    font-weight: 800;
}

.close-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: var(--soft);
    color: var(--text);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-btn:hover {
    background: #e2dcd2;
    transform: rotate(90deg);
}

/* =========================================
   FORM ELEMENTS
========================================= */
.project-form {
    padding: 34px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--soft);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    transition: var(--transition);
    outline: none;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: #b8ac97;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    background: var(--panel);
    border-color: var(--text);
    box-shadow: var(--focus-ring);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* =========================================
   UPLOAD DROPZONE
========================================= */
.upload-section {
    margin-top: 40px;
    background: #faf8f4;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--line);
}

.upload-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-dropzone {
    border: 2px dashed #d8cfbf;
    background: var(--panel);
    border-radius: 16px;
    min-height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.upload-dropzone:hover {
    border-color: var(--text);
    background: #fdfcfb;
}

.upload-dropzone.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: scale(1.02);
}

.upload-dropzone input {
    display: none;
}

.dropzone-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--muted);
}

.dropzone-text {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.dropzone-subtext {
    font-size: 12px;
    color: var(--muted);
}

/* =========================================
   IMAGE MANAGER & PREVIEW CARDS
========================================= */
.image-manager {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.preview-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f4efe7;
    aspect-ratio: 1/1;
    cursor: grab;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.preview-card:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevents ghost drag issues */
}

/* DRAG HANDLE */
.drag-handle {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: var(--text);
    opacity: 0;
    transition: var(--transition);
}

.preview-card:hover .drag-handle {
    opacity: 1;
}

/* REMOVE BUTTON */
.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: var(--transition);
    opacity: 0;
}

.preview-card:hover .remove-image {
    opacity: 1;
}

.remove-image:hover {
    background: #ef4444; /* Red for destructive action */
    transform: scale(1.1);
}

/* =========================================
   FOOTER BUTTONS
========================================= */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    gap: 16px;
}

.save-btn {
    border: none;
    background: var(--text);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.save-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.save-btn:active {
    transform: translateY(0);
}

.delete-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.delete-btn:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fca5a5;
}

/* =========================================
   LIGHTBOX
========================================= */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    transform: scale(1.1);
}

/* =========================================
   MOBILE RESPONSIVENESS
========================================= */
@media (max-width: 1024px) {
    .admin-app {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }
    
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 0;
    }

    .modal-box {
        border-radius: 0;
        height: 100vh;
        max-height: 100vh;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .save-btn, .delete-btn {
        width: 100%;
        text-align: center;
    }
}


.theme-toggle {
    display: flex !important;
    visibility: visible !important;
    z-index: 100;
}/* TAMSOS TEMOS KINTAMIEJI */
body.dark-theme {
    --bg: #121212;
    --panel: #1e1e1e;
    --text: #f5f3ee;
    --muted: #9ca3af;
    --line: #333;
    --soft: #2c2c2c;
}

/* TEMA JUNGTUKO STILIAI */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.theme-toggle span { 
    position: absolute;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-sun { opacity: 0; transform: translateY(20px) rotate(45deg); }
.icon-moon { opacity: 1; transform: translateY(0) rotate(0); }

body.dark-theme .icon-sun { opacity: 1; transform: translateY(0) rotate(0); }
body.dark-theme .icon-moon { opacity: 0; transform: translateY(-20px) rotate(-45deg); }

/* TAMSUS REŽIMAS: PAPILDYTI EFEKTAI */
body.dark-theme .project-card {
    background: #1e1e1e; /* Tamsus fonas */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Šviesesnis borderis, kad matytųsi */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* "Glow" efektas užvedus pelę tamsiame režime */
body.dark-theme .project-card:hover {
    border-color: #b89c72; /* Tavo auksinė/smėlinė spalva */
    box-shadow: 0 0 15px rgba(184, 156, 114, 0.2); /* Švytėjimas */
}

/* Kad tekstas "šviestų" tamsiame fone */
body.dark-theme .project-card h3 {
    color: #f5f3ee;
}

body.dark-theme .project-card p {
    color: #9ca3af;
}

/* =========================================
   MODERN DARK MODE STYLES
========================================= */

/* 1. "+" MYGTUKAS (SaaS stilius) */
.add-project-btn {
    background: #b89c72 !important; /* Švelni auksinė/smėlinė spalva */
    color: #121212 !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    border: none !important;
}
.add-project-btn:hover {
    background: #d4b585 !important;
    transform: scale(1.05);
}



/* Kai kategorija aktyvi */
.category-filter.active {
    background: var(--primary) !important;
    color: #121212 !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(184, 156, 114, 0.3) !important;
}

/* 3. PROJEKTŲ KORTELĖS (Glow efektas) */
body.dark-theme .project-card {
    background: #1e1e1e !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .project-card:hover {
    border-color: #b89c72 !important;
    box-shadow: 0 0 15px rgba(184, 156, 114, 0.2) !important;
}

/* 4. MODAL FORMA (Kad laukeliai būtų aiškūs) */
body.dark-theme .form-group input, 
body.dark-theme .form-group textarea, 
body.dark-theme .form-group select {
    background: #121212 !important;
    border: 1px solid #333 !important;
    color: #f5f3ee !important;
}

/* =========================================
   FIX: TAMSUS REŽIMAS (Upload & Buttons)
========================================= */

/* Nuotraukų įkėlimo sekcija - pašaliname šviesų foną */
body.dark-theme .upload-section {
    background: #1e1e1e !important; /* Tamsus fonas vietoje šviesaus */
    border: 1px solid #333 !important; /* Tamsus rėmelis */
}

/* Nuotraukų dropzone (punktyrinis rėmelis) */
body.dark-theme .upload-dropzone {
    background: #121212 !important;
    border: 2px dashed #333 !important; /* Tamsus punktyras */
    color: #9ca3af !important;
}

/* "Išsaugoti projektą" mygtuko stilius */
body.dark-theme .save-btn {
    background: #b89c72 !important; /* Auksine/smėlinė spalva */
    color: #121212 !important;
    border: none !important;
}

/* Ištrinti mygtukas (kad būtų subtilus) */
body.dark-theme .delete-btn {
    background: transparent !important;
    color: #ef4444 !important;
}
/* =================================================================
   iOS STILIAUS TEMOS JUNGTUKAS (BULLETPROOF)
================================================================= */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--soft); /* Pridedame foną, kad atrodytų kaip atskiras elementas */
    padding: 6px 16px;
    border-radius: 99px;
    border: 1px solid var(--line);
    margin-left: auto; /* Nustumia į dešinę, jei reikia */
}

.theme-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text) !important; /* Priverčiame reaguoti į tamsią temą */
    min-width: 45px;
    text-align: center;
}

.ios-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    margin: 0 !important;
}

.ios-switch input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
}

.ios-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--muted) !important;
    transition: 0.3s;
    border-radius: 34px;
}

/* Burbuliuko dizainas (visada baltas) */
.ios-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff !important; 
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* KAI ĮJUNGTAS TAMSUS REŽIMAS */
.ios-switch input:checked + .ios-slider {
    background-color: var(--primary) !important; /* Akcentinė tavo dizaino spalva */
}

.ios-switch input:checked + .ios-slider:before {
    transform: translateX(20px) !important;
}
/* VISŲ JUODŲ APVADŲ ŠVELNINIMAS */
.sidebar-category, 
.category-item, 
.project-card,
.sidebar-section {
    border: 1px solid var(--line);
}

/* Jei nori dar švelniau (beveik nematoma linija šviesioje temoje) */
body:not(.dark-theme) .project-card,
body:not(.dark-theme) .sidebar-category {
    border-color: rgba(0, 0, 0, 0.05) !important;
}
body.dark-theme .category-filter.active {
    background: var(--primary) !important;
    color: #121212 !important;
    border-color: var(--primary) !important;
}
/* =========================================
   BORDER & DARK THEME FIX (FINAL)
========================================= */

/* Pašaliname visus borderius aplink kategorijas ir sidebar projektus */
.category-filter,
.sidebar-project,
.sidebar-section,
.category-filters,
.sidebar-projects,
body.dark-theme .category-filter,
body.dark-theme .sidebar-project,
body.dark-theme .sidebar-section {
    border: none !important;
    box-shadow: none !important;
}

/* Aktyvios kategorijos stilius */
.category-filter.active {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(184, 156, 114, 0.25) !important;
}

body.dark-theme .category-filter.active {
    background: var(--primary) !important;
    color: #121212 !important;
    box-shadow: 0 0 0 3px rgba(184, 156, 114, 0.35) !important;
}
/* Papildomas agresyvus valymas */
body .category-filter,
body .sidebar-project,
body .sidebar-section {
    border: none !important;
}
/* =========================================
   ADMIN TABS
========================================= */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0;
}

.admin-tab {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-tab:hover {
    background: var(--soft);
    color: var(--text);
}

.admin-tab.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.admin-tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   RATING INPUT STARS
========================================= */
.rating-input i {
    cursor: pointer;
    transition: var(--transition);
}

.rating-input i:hover {
    transform: scale(1.1);
}

.rating-input i.fas {
    color: #f59e0b;
}

/* =========================================
   PROJECT SELECTOR MODAL
========================================= */
.project-selector-btn {
    width: 100%;
    padding: 14px 16px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.project-selector-btn:hover {
    border-color: var(--primary);
    background: var(--panel);
}

.project-selector-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.project-selector-modal.active {
    display: flex;
}

.project-selector-box {
    background: var(--panel);
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-selector-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-selector-header input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 40px;
    background: var(--soft);
    margin-right: 16px;
}

.project-selector-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    overflow-y: auto;
    max-height: 500px;
}

.project-selector-item {
    background: var(--soft);
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    gap: 12px;
    align-items: center;
}

.project-selector-item:hover {
    transform: translateY(-2px);
    background: var(--soft-2);
}

.project-selector-item.selected {
    border-color: var(--primary);
    background: rgba(184, 156, 114, 0.1);
}

.project-selector-item img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
}

.project-selector-item .info h4 {
    margin: 0 0 4px;
    font-size: 14px;
}

.project-selector-item .info p {
    margin: 0;
    font-size: 11px;
    color: var(--muted);
}
}/* =========================================
   REVIEW FORM STYLES
========================================= */
#reviewForm .form-group {
    margin-bottom: 24px;
}

#reviewForm .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

#reviewForm .form-group input,
#reviewForm .form-group textarea,
#reviewForm .form-group select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--soft);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    transition: var(--transition);
    outline: none;
}

#reviewForm .form-group input:focus,
#reviewForm .form-group textarea:focus,
#reviewForm .form-group select:focus {
    background: var(--panel);
    border-color: var(--text);
    box-shadow: var(--focus-ring);
}

#reviewForm .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

#reviewForm .rating-input {
    display: flex;
    gap: 8px;
    font-size: 28px;
    cursor: pointer;
}

#reviewForm .rating-input i {
    transition: var(--transition);
}

#reviewForm .rating-input i:hover {
    transform: scale(1.1);
}

#reviewForm .upload-dropzone {
    border: 2px dashed var(--line);
    background: var(--soft);
    border-radius: 16px;
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
}

#reviewForm .upload-dropzone:hover {
    border-color: var(--primary);
    background: var(--panel);
}

#reviewForm .image-manager {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

#reviewForm .preview-card {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--soft);
    border: 1px solid var(--line);
    cursor: pointer;
}

#reviewForm .preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#reviewForm .preview-card .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: var(--transition);
}

#reviewForm .preview-card:hover .remove-image {
    opacity: 1;
}

#reviewForm .modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    gap: 16px;
}

@media (max-width: 768px) {
    #reviewForm .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    #reviewForm .modal-footer {
        flex-direction: column-reverse;
    }
    
    #reviewForm .save-btn,
    #reviewForm .delete-btn {
        width: 100%;
        text-align: center;
    }
}
/* =========================================
   APPROVE TOGGLE SWITCH (su temos palaikymu)
========================================= */
.approve-toggle {
    position: relative;
    width: 60px;
    height: 32px;
    cursor: pointer;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--soft-2);
    border-radius: 34px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--line);
}

.toggle-knob {
    position: absolute;
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 2px;
    background-color: var(--panel);
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid var(--line);
}

/* Aktyvi būsena */
.approve-toggle.active .toggle-slider {
    background: linear-gradient(135deg, var(--primary), #d4b585);
    border-color: var(--primary);
}

.approve-toggle.active .toggle-knob {
    transform: translateX(28px);
    background-color: var(--panel);
    box-shadow: 0 2px 8px rgba(184, 156, 114, 0.4);
    border-color: var(--primary);
}

/* Hover efektas */
.approve-toggle:hover .toggle-knob {
    transform: scale(1.05);
}

.approve-toggle.active:hover .toggle-knob {
    transform: translateX(28px) scale(1.05);
}

/* Pulsavimo animacija kai patvirtinta */
.approve-toggle.active {
    animation: togglePulse 0.5s ease;
}

@keyframes togglePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Tamsus režimas */
body.dark-theme .toggle-slider {
    background-color: var(--soft);
    border-color: var(--line);
}

body.dark-theme .toggle-knob {
    background-color: var(--panel);
    border-color: var(--line);
}

body.dark-theme .approve-toggle.active .toggle-slider {
    background: linear-gradient(135deg, #b89c72, #9a7c58);
    border-color: #b89c72;
}

body.dark-theme .approve-toggle.active .toggle-knob {
    background-color: var(--panel);
    box-shadow: 0 2px 8px rgba(184, 156, 114, 0.5);
}
/* =========================================
   REVIEW MODAL OVERRIDES
========================================= */
#reviewModal .modal-box {
    max-width: 700px;
}

#reviewModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 34px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: var(--panel);
    z-index: 10;
}

#reviewModal .modal-kicker {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
}

#reviewModal .close-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--soft);
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

#reviewModal .close-btn:hover {
    transform: rotate(90deg);
}
/* Laukiančių atsiliepimų badge su pulsavimu */
#reviewsPendingBadge {
    background: #f59e0b !important;
    color: #121212 !important;
    border-radius: 99px;
    padding: 2px 8px;
    font-size: 11px;
    margin-left: 8px;
    font-weight: 700;
    animation: pulse-badge 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes pulse-badge {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* Grįžti mygtuko hover efektas */
.back-to-site-btn:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    transform: translateY(-2px);
}
/* =========================================
   MOBILIOSIOS ADMIN PANELĖS ADAPTAVIMAS
   ========================================= */

/* Mobilus meniu mygtukas (hamburgeris) */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: #d4b585;
    transform: scale(1.05);
}

/* Sidebar mobilus variantas */
@media (max-width: 1024px) {
    /* Paslėpiame sidebar ir pridedame hamburgerį */
    .admin-app {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: none;
        background: var(--panel);
        border-right: 1px solid var(--line);
        overflow-y: auto;
        padding-top: 70px;
    }
    
    .sidebar.open {
        left: 0;
        box-shadow: 2px 0 20px rgba(0,0,0,0.15);
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Užtemimas kai sidebar atidarytas */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
        cursor: pointer;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Pagrindinis turinys */
    .main-content {
        padding: 80px 20px 20px;
        width: 100%;
    }
    
    /* Topbar mobilus */
    .topbar {
        position: sticky;
        top: 0;
        background: var(--bg);
        z-index: 100;
        padding: 15px 0;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    
    .topbar h1 {
        font-size: 22px;
    }
    
    .topbar p {
        font-size: 12px;
    }
    
    .topbar-actions {
        gap: 10px !important;
        flex-wrap: wrap;
    }
    
    .back-to-site-btn,
    .logout-btn {
        padding: 8px 12px !important;
        font-size: 12px;
    }
    
    .back-to-site-btn span,
    .logout-btn span {
        display: none;
    }
    
    .back-to-site-btn i,
    .logout-btn i {
        margin: 0;
        font-size: 16px;
    }
    
    .theme-switch-wrapper {
        padding: 5px 12px;
    }
    
    .theme-label {
        font-size: 11px !important;
        min-width: 35px;
    }
    
    .ios-switch {
        width: 40px;
        height: 22px;
    }
    
    .ios-slider:before {
        height: 16px;
        width: 16px;
        bottom: 2px;
        left: 3px;
    }
    
    .ios-switch input:checked + .ios-slider:before {
        transform: translateX(18px);
    }
    
    .add-project-btn {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    /* Projektų grid'as */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .project-card {
        border-radius: 16px;
    }
    
    .project-card-body h3 {
        font-size: 16px;
    }
    
    .project-card-body p {
        font-size: 12px;
    }
    
    .project-thumb {
        aspect-ratio: 4/3;
    }
    
    /* Modalai */
    .modal-box {
        width: 95%;
        max-height: 85vh;
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-kicker {
        font-size: 10px;
    }
    
    .close-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .project-form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    /* Dropzone */
    .upload-dropzone {
        min-height: 100px;
        padding: 15px;
    }
    
    .dropzone-icon {
        font-size: 20px;
    }
    
    .dropzone-text {
        font-size: 13px;
    }
    
    .dropzone-subtext {
        font-size: 10px;
    }
    
    .image-manager {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 12px;
    }
    
    /* Mygtukai */
    .save-btn,
    .delete-btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Admin tabs */
    .admin-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .admin-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* Atsiliepimų kortelės */
    .review-card .project-thumb .review-rating-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .review-card .project-card-body h3 {
        font-size: 15px;
    }
    
    /* Statistika mobiliam */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-highlight-number {
        font-size: 28px;
    }
    
    .stat-highlight-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    /* Projektų selectorius mobiliam */
    .project-selector-grid {
        grid-template-columns: 1fr;
    }
    
    .project-selector-item img {
        width: 40px;
        height: 40px;
    }
    
    .project-selector-item .info h4 {
        font-size: 13px;
    }
    
    /* Lightbox mobilus */
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-counter {
        font-size: 12px;
        padding: 4px 10px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 70px 15px 15px;
    }
    
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .projects-grid {
        gap: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .admin-tabs {
        gap: 4px;
    }
    
    .admin-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .admin-tab i {
        font-size: 12px;
    }
}