/* =========================================
   Global Variables
   ========================================= */
:root {
    color-scheme: only dark; /* Forces dark mode */
    --bg-color: #121212;          
    --text-color: #ffffff;        
    --text-muted: #a0a0a0;        
    --accent-color: #cd3e3e;      
    --accent-hover: #a53232;      
    --header-bg: rgba(0, 0, 0, 0.4); 
    --border-color: #333333;      
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color); 
    background-color: var(--bg-color);
}

/* =========================================
   Home Page
   ========================================= */

/* Mobile exclusive page title */
.mobile-page-title {
    display: none; 
}

.home-hero {
    height: 100vh; 
    width: 100%;
    
    background-image: url('../assets/images/bg-home.webp');
    background-attachment: fixed;
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    
    display: flex;
    justify-content: center; 
    align-items: center; 
    text-align: center;
}

.artist-name {
    font-size: 4rem; 
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); 
}

.artist-subtitle {
    font-size: 1.5rem;
    font-style: italic;
    opacity: 0.9;
    color: var(--text-muted);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
}

/* =========================================
   Mobile Responsive
   ========================================= */
@media (max-width: 768px) {
    
    /* 1. Scale down home title */
    h1 {
        font-size: 2.2rem !important;
        letter-spacing: 2px !important;
        margin-top: 0px;
    }

    /* 2. Burger Menu */
    .menu-toggle {
        display: block;
        background: transparent;
        border: none;
        color: white;
        cursor: pointer;
        position: fixed; 
        top: 25px;      
        right: 25px;    
        z-index: 1001; 
    }

    /* Hidden vertical dropdown menu */
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100vw;
        height: 100vh;
        background-color: rgba(15, 15, 15, 0.98);
        transition: right 0.4s ease;
        gap: 40px;
        z-index: 1000;
    }

    /* Active state class toggled by JS */
    .nav-links.active {
        right: 0;
    }

    /* Enlarge links for touch targets */
    .nav-links li a {
        font-size: 1.8rem;
    }

    /* Center mobile header title */
    .mobile-page-title {
        display: block;
        position: fixed;
        top: 25px; 
        left: 50%;
        transform: translateX(-50%); 
        color: var(--accent-color); 
        font-size: 1.1rem;
        font-weight: bold;
        letter-spacing: 2px;
        text-transform: uppercase;
        z-index: 1001; 
        margin: 0;
        pointer-events: none; 
        text-align: center;
        white-space: nowrap;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    /* Hidden state class */
    .mobile-page-title.title-hidden {
        opacity: 0;
        visibility: hidden;
    }
}

/* Hide burger menu on desktop */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

/* =========================================
   Global Navigation (Header)
   ========================================= */

.main-header {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    background: var(--header-bg); 
    backdrop-filter: blur(5px); 
    padding: 40px 0; 
    z-index: 1000; 
    box-sizing: border-box; 
}

.navbar {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    gap: 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
}

.nav-links {
    list-style: none; 
    display: flex;
    justify-content: center; 
    gap: 40px; 
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s ease; 
}

/* Hover state styles */
.nav-links a:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 4px;
}

/* Active state styles */
.nav-links a.active {
    font-weight: bold;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 4px; 
}

/* =========================================
   Gallery Page
   ========================================= */

.gallery-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 30px 50px 30px;
    gap: 40px;
    align-items: flex-start;
}

/* --- Sidebar --- */
.gallery-sidebar {
    width: 200px;
    flex-shrink: 0;
}

.gallery-sidebar h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--accent-color);
}

/* ==========================================
   Tags and Filters
   ========================================== */

/* Compact tag container */
.filter-list.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Badge-style buttons */
.filter-btn {
    background-color: #2a2a2a;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: #444;
    color: #fff;
    border-color: #666;
}

/* Active tag state */
.filter-btn.active {
    background-color: #fff;
    color: #000;
    border-color: #fff;
    font-weight: bold;
}

/* --- Grid --- */
.gallery-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    display: block;
}

/* =========================================
   Modal (Image Preview)
   ========================================= */

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-color);
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    position: relative;
}

.modal-image-container {
    flex: 2;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-info-container {
    flex: 1;
    padding: 40px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--accent-color);
}

/* Mobile responsive layout */
@media (max-width: 768px) {
    .gallery-layout { flex-direction: column; }
    .gallery-sidebar { width: 100%; display: flex; flex-direction: column; align-items: center;}
    .filter-list { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .modal-content { flex-direction: column; height: 90vh; }
    .modal-image-container { flex: 1; }
    .modal-info-container { flex: 0; padding: 20px; overflow-y: auto;}
}

/* =========================================
   Commissions Page
   ========================================= */

.commissions-layout {
    max-width: 1000px;
    margin: 0 auto;
    padding: 150px 30px 50px 30px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.commissions-header-links {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
}

.price-warning {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 60px;
}

/* --- Buttons and Links --- */
.btn-outline {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.text-link {
    background: none;
    border: none;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.text-link:hover {
    color: var(--accent-color);
}

/* --- Tier Cards --- */
.commission-tier {
    display: flex;
    width: 100%;
    margin-bottom: 60px;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    align-items: stretch; 
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.commission-tier:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.tier-image {
    flex: 1;
}

.tier-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Card Content --- */
.tier-content {
    flex: 1;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-status {
    align-self: center;
    background: rgba(205, 62, 62, 0.2); 
    color: var(--accent-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.tier-content h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.card-price {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: normal;
    margin-bottom: 30px;
}

.card-details {
    display: flex;
    justify-content: space-around;
    text-align: left;
    margin-bottom: 40px;
}

.detail-section h4 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

.detail-section ul {
    list-style: none;
    color: var(--text-muted);
    line-height: 1.8;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .commission-tier {
        flex-direction: column;
    }
    
    .tier-image {
        height: 300px;
    }
    
    .tier-content {
        padding: 30px 20px;
    }

    /* Mobile button text wrapping fixes */
    .btn-primary, 
    .btn-secondary, 
    .btn-outline,
    .admin-action-btn {
        white-space: normal !important;
        height: auto !important;
        min-height: 48px !important;
        padding: 12px 15px !important;
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        width: 100%;
        box-sizing: border-box !important;
    }
}

/* --- Specific TOS Modal --- */
.modal-tos-content {
    background: var(--bg-color);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    padding: 40px;
    border-radius: 12px;
    position: relative;
    border: 1px solid var(--border-color);
    overflow-y: auto; 
}

.modal-tos-content h2 {
    margin-bottom: 20px;
    color: var(--accent-color);
}

.tos-text {
    color: var(--text-muted);
    line-height: 1.6;
}

.close-tos-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close-tos-btn:hover {
    color: var(--accent-color);
}

/* ========================================= */
/* TOS Panel (Admin Dashboard)               */
/* ========================================= */

.admin-tos-container {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #333);
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.tos-title {
    margin-top: 0;
    color: var(--accent-color, #cd3e3e);
    border-bottom: 1px solid var(--border-color, #333);
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.tos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.tos-box label {
    display: block;
    margin-bottom: 12px;
    font-weight: bold;
    color: var(--text-color, #fff);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tos-box textarea {
    width: 100%;
    box-sizing: border-box;
    background: #121212;
    color: var(--text-muted, #ccc);
    border: 1px solid var(--border-color, #444);
    padding: 15px;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.tos-box textarea:focus {
    outline: none;
    border-color: var(--accent-color, #cd3e3e);
    box-shadow: 0 0 8px rgba(205, 62, 62, 0.2);
}

@media (max-width: 768px) {
    .tos-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Multi-step Form Page
   ========================================= */

.form-page-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 150px 30px 50px 30px;
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 40px;
    align-items: flex-start;
}

/* --- Column 1 : Steps Indicator --- */
.steps-list {
    list-style: none;
    position: sticky;
    top: 150px;
}

.step-item {
    padding: 15px 0;
    color: var(--text-muted);
    font-size: 1.1rem;
    border-left: 3px solid var(--border-color);
    padding-left: 15px;
    transition: all 0.3s ease;
}

.step-item.active {
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: bold;
}

/* --- Column 2 : Form Container --- */
.form-container {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-step h2 {
    margin-bottom: 30px;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* --- Input Styles --- */
.input-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-weight: bold;
}

.input-group input[type="text"],
.input-group select,
.input-group textarea {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 12px 15px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.help-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

/* --- Checkboxes & Counters --- */
.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal !important;
}

.checkbox-label input {
    accent-color: var(--accent-color);
    width: 18px;
    height: 18px;
}

.counter-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 5px;
}

.counter-container button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 10px;
}

.counter-container button:hover {
    color: var(--accent-color);
}

/* --- Buttons --- */
.btn-primary, .btn-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 25px; 
    height: 48px; 
    font-size: 1rem; 
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    box-sizing: border-box; 
    margin: 0;
    vertical-align: middle;
}

.btn-secondary {
    background-color: #1e1e1e; 
    color: var(--text-muted);
    border: 3px solid transparent;
}

.btn-secondary:hover {
    background-color: #2a2a2a; 
    color: var(--text-color); 
}

.btn-primary {
    background-color: transparent; 
    color: var(--text-color); 
    border: 3px solid var(--accent-color); 
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-color); 
    color: #ffffff;
    text-shadow: none; 
}

#submitBtn:disabled {
    border-color: #444;
    color: #555;
    text-shadow: none;
    cursor: not-allowed;
    background-color: transparent;
}

/* --- Actions --- */
.form-actions {
    margin-top: 40px;
    display: flex;
    justify-content: center; 
    align-items: center;
    gap: 20px; 
}

/* --- Success Message --- */
.success-message {
    display: none;
    text-align: center;
    color: #ffffff;
    background-color: rgba(205, 62, 62, 0.2);
    border: 1px solid var(--accent-color);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    font-weight: bold;
    animation: fadeIn 0.5s ease;
}

/* --- Column 3 : Price Panel --- */
.price-sidebar {
    position: sticky;
    top: 150px;
}

.price-box {
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.price-box h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.total-price {
    font-size: 2.5rem;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.price-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Form Responsive Layout --- */
@media (max-width: 992px) {
    
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .form-page-layout {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        padding: 120px 15px 40px 15px !important; 
        box-sizing: border-box;
    }

    .price-sidebar {
        position: static;
        order: -1; 
        width: 100%;
        box-sizing: border-box;
    }

    .form-container {
        padding: 25px 15px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow: hidden;
    }

    .input-group input[type="text"],
    .input-group input[type="email"],
    .input-group input[type="number"],
    .input-group select,
    .input-group textarea {
        font-size: 16px !important; 
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 15px;
        width: 100%;
    }

    .form-actions .btn-primary, 
    .form-actions .btn-secondary {
        width: 100%; 
        margin: 0;
    }
    
    .checkbox-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* =========================================
   Contact Page
   ========================================= */

.contact-page-layout {
    max-width: 800px;
    margin: 0 auto;
    padding: 170px 30px 100px 30px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* --- SECTION 1 : Copy List --- */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
    margin-left: 5vw;
}

.contact-list h1 {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.copy-item {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    text-align: left;
    position: relative;
    padding: 0;
    transition: opacity 0.3s ease;
}

.copy-item:hover {
    opacity: 0.8;
}

.contact-icon {
    width: 32px;
    height: 32px;
    color: #ffffff;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-label {
    color: #888888;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.contact-value {
    color: #ffffff;
    font-size: 1.3rem;
}

/* Toast message indicator */
.toast-message {
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.toast-message.show {
    opacity: 1;
    visibility: visible;
}

.contact-top-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

/* Profile image styling */
.contact-profile-img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    
    /* Fade edge mask */
    -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 55%, rgba(0,0,0,0) 100%);
    mask-image: radial-gradient(circle, rgba(0,0,0,1) 55%, rgba(0,0,0,0) 100%);
    
    opacity: 0.9;
}

/* --- SECTION 2 : Social Links --- */
.socials-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.socials-section h2 {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.socials-grid {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px);
}

.social-circle {
    width: 80px;
    height: 80px;
    border: 2px solid #555555;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.social-circle svg {
    width: 35px;
    height: 35px;
}

.social-link:hover .social-circle {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.social-text {
    color: #888888;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.social-link:hover .social-text {
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .toast-message {
        right: 0;
        top: -30px;
        transform: translateY(0);
    }
    
    .contact-top-section {
        flex-direction: column;
        text-align: center;
        gap: 60px;
    }

    .contact-list {
        margin-left: 0;
        align-items: center;
    }

    .contact-profile-img {
        width: 200px;
        height: 200px;
    }
}

/* =========================================
   Admin Login Page
   ========================================= */

.admin-login-layout {
    max-width: 500px;
    margin: 0 auto;
    padding: 180px 30px 100px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-login-card {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.admin-login-card h2 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 25px;
    text-align: center;
    letter-spacing: 2px;
}

.admin-login-error {
    background-color: rgba(205, 62, 62, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: none;
}

/* =========================================
   Admin Dashboard
   ========================================= */

.dashboard-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 180px 30px 50px 30px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.dashboard-header h1 {
    color: var(--accent-color);
    font-size: 2.2rem;
    letter-spacing: 2px;
}

.admin-header-actions {
    display: flex;
    gap: 15px;
}

.admin-action-btn {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--text-color);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
}

.admin-action-btn:hover {
    background-color: var(--accent-color);
}

/* Navigation Tabs */
.admin-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.tab-btn {
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tab-btn.active, .tab-btn:hover {
    background: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

.tab-content {
    display: none;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Data Tables */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    color: var(--accent-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table td {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.table-loading {
    text-align: center;
}

.table-subtext {
    font-size: 0.8rem;
}

.table-price {
    color: var(--accent-color);
    font-weight: bold;
}

/* Admin Forms */
.admin-settings-form {
    margin-top: 20px;
    max-width: 500px;
}

.admin-artwork-form {
    margin-top: 20px;
    max-width: 600px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-file-input {
    background: var(--bg-color);
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
}

/* =========================================
   Text Overflow Corrections
   ========================================= */
.admin-request-card, 
.admin-request-card *, 
.modal-content, 
.modal-content * {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* =========================================
   Single Column Layout (Edit Form)
   ========================================= */
#editRequestForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#editRequestForm div[style*="display:flex"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

#editRequestForm .input-group,
#editRequestForm input,
#editRequestForm select,
#editRequestForm textarea {
    width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* =========================================
   Request Edit Sections
   ========================================= */
.edit-section-box {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.edit-section-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #fff;
}

.edit-section-box textarea {
    width: 100%;
    box-sizing: border-box;
    background: #121212;
    color: #fff;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 5px;
    font-family: inherit;
    resize: vertical;
}

.admin-notes-box-accent {
    background: rgba(205, 62, 62, 0.06);
    border: 1px solid var(--accent-color);
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.admin-notes-box-accent label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--accent-color) !important;
}

.admin-notes-box-accent textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: 1px solid rgba(205, 62, 62, 0.3);
    padding: 10px;
    border-radius: 5px;
    font-family: inherit;
    resize: vertical;
}

/* =========================================
   Request Cards Design
   ========================================= */

#requestsCardsContainer {
    gap: 30px !important;
}

.admin-request-card {
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-top: 8px solid #444; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.admin-request-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-left-color: var(--border-color); 
    border-right-color: var(--border-color);
    border-bottom-color: var(--border-color);
}

/* Status colors */
.admin-request-card.status-pending     { border-top-color: #f39c12 !important; }
.admin-request-card.status-in_progress { border-top-color: #f1c40f !important; }
.admin-request-card.status-done        { border-top-color: #2ecc71 !important; }
.admin-request-card.status-refused     { border-top-color: #e74c3c !important; }

.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.request-client-name {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}

.request-client-email {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.request-date {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.request-price {
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--accent-color);
    background: rgba(205, 62, 62, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(205, 62, 62, 0.3);
    white-space: nowrap;
}

.request-status-badge {
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}
.badge-pending { background: rgba(243, 156, 18, 0.15); color: #f39c12; border: 1px solid rgba(243, 156, 18, 0.3); }
.badge-in_progress { background: rgba(241, 196, 15, 0.15); color: #f1c40f; border: 1px solid rgba(241, 196, 15, 0.3); }
.badge-done { background: rgba(46, 204, 113, 0.15); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.3); }
.badge-refused { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border: 1px solid rgba(231, 76, 60, 0.3); }

.request-details-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-color);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.request-detail-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #2a2a2a;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #ddd;
    line-height: 1.4;
}

.request-notes-box {
    font-size: 0.85rem;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px dashed var(--accent-color);
    white-space: pre-wrap;
}

.request-actions-row {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    align-items: center;
    justify-content: flex-end;
}

.filter-req-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-req-btn.active {
    font-weight: bold !important;
    text-decoration: underline !important;
    background: none !important; 
}

/* =========================================
   Admin Dashboard Responsive
   ========================================= */
@media (max-width: 768px) {
    .dashboard-layout {
        padding: 120px 15px 40px 15px !important;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .admin-header-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .admin-action-btn {
        width: 100%;
        padding: 12px;
    }

    .admin-tabs {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
        padding: 15px;
        font-size: 1.1rem;
    }

    .tab-content {
        padding: 20px 15px;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-services-grid {
        grid-template-columns: 1fr;
    }

    .option-row {
        flex-wrap: wrap; 
    }

    #masterCloseBtn {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 0.95rem !important;
        padding: 12px 10px !important;
        white-space: normal !important;
        line-height: 1.4;
        margin-bottom: 20px;
    }

    /* Client Requests Layout */
    #tab-requests > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 15px !important;
    }

    #tab-requests aside {
        width: 100% !important;
        order: -1 !important;
    }

    #tab-requests aside ul {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 8px !important;
        margin-top: 10px;
    }

    .filter-req-btn {
        width: 100%;
        text-align: left;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        border-radius: 4px;
        transition: all 0.2s ease;
    }

    .filter-req-btn.active {
        font-weight: bold !important;
        text-decoration: underline !important;
        background: none !important; 
    }

    input, textarea, select, .admin-request-card, .request-detail-item {
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
    }

    #requestsCardsContainer {
        width: 100% !important;
        grid-template-columns: 1fr !important;
    }

    #requestsCardsContainer {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        grid-template-columns: 1fr !important;
    }

    #requestsCardsContainer > div {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        word-break: break-word !important;
    }

    #requestsCardsContainer div, 
    #requestsCardsContainer p, 
    #requestsCardsContainer strong,
    #requestsCardsContainer a {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-wrap: break-word !important;
    }
}

/* =========================================
   Dashboard: Tags & Checkboxes
   ========================================= */
.tags-section {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tags-section label {
    display: block;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.tags-actions {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.btn-text-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.btn-text-remove:hover {
    color: #ff4d4d;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.btn-text-add {
    background: none;
    border: none;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.btn-text-add:hover {
    color: var(--accent-color);
}

/* =========================================
   Dashboard: Service Cards
   ========================================= */
.admin-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.admin-service-card {
    background: #1e1e1e;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: border-color 0.3s;
}

.admin-service-card:hover {
    border-color: var(--accent-color);
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.admin-input-title {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    width: 70%;
    border-bottom: 1px dashed var(--text-muted);
}

.admin-input-title:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}

/* Open/Closed Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #555; transition: .4s;
}
.slider:before {
    position: absolute; content: "";
    height: 16px; width: 16px; left: 4px; bottom: 4px;
    background-color: white; transition: .4s;
}
input:checked + .slider { background-color: var(--accent-color); }
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

.card-closed-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(139, 0, 0, 0.4);
    z-index: 10;
    pointer-events: none;
}

/* ==========================================
   Closed Cards Style
   ========================================== */
.commission-tier.closed-card {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.commission-tier.closed-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(139, 0, 0, 0.25);
    mix-blend-mode: multiply;
    pointer-events: none;
    border-radius: inherit;
}

.commission-tier.closed-card .card-status {
    color: #ff4444;
    font-weight: bold;
}

/* ==========================================
   Language Switch Toggle
   ========================================== */
.lang-switch-container {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    z-index: 100;
}

.lang-switch {
    position: relative;
    display: inline-block;
    width: 76px;
    height: 36px;
}

.lang-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lang-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #121212;
    border: 1px solid #333;
    border-radius: 6px;
    transition: 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lang-slider::before {
    position: absolute;
    content: "";
    height: 28px;
    width: 35px;
    left: 3px;
    bottom: 3px;
    background-color: var(--accent-color, #cd3e3e);
    border-radius: 4px;
    transition: 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Language labels */
.lang-text {
    z-index: 3;
    transition: color 0.3s;
    user-select: none;
    font-size: 0.75rem;
    font-weight: bold;
    width: 50%;
    text-align: center;
    line-height: 36px;
}

input:checked + .lang-slider::before {
    transform: translateX(33px);
}

/* Label text colors */
input:not(:checked) + .lang-slider .fr { color: #fff; }
input:not(:checked) + .lang-slider .en { color: #666; }

input:checked + .lang-slider .en { color: #fff; }
input:checked + .lang-slider .fr { color: #666; }

@media (max-width: 768px) {
    .lang-switch-container {
        top: 20px;
        left: 20px;
        right: auto;
        transform: none;
    }
}