/* ROOT VARIABLES & RESET */
:root {
    --bg-color: #0f111a;
    --glass-bg: rgba(25, 28, 41, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary-color: #6b46c1; /* Purple */
    --primary-hover: #805ad5;
    --accent-color: #00e676; /* Neon Green */
    --text-main: #f8f9fa;
    --text-muted: #a0aec0;
    --sidebar-width: 280px;
    --header-height: 80px;
    --diamond-color: #00e5ff;
    --silver-color: #c0c0c0;
    --bronze-color: #cd7f32;
    --danger-color: #ff4757;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box !important;
    font-family: 'Outfit', sans-serif;
}


body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(107, 70, 193, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 230, 118, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden !important;
    width: 100%;
}


/* GLASSMORPHISM UTILITY */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.mt-30 {
    margin-top: 30px;
}

/* TYPOGRAPHY & BUTTONS */
h1, h2, h3, h4 { font-weight: 600; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover {
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* LAYOUT */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 17, 26, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
}

.logo-area {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 30px;
    gap: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.4);
}

.sidebar-nav {
    padding: 30px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 15px 20px;
    border-radius: 12px;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.nav-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    background: linear-gradient(90deg, rgba(107, 70, 193, 0.2), transparent);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
}

.logout-btn {
    width: 100%;
    background: rgba(255, 71, 87, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(255, 71, 87, 0.2);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.logout-btn:hover {
    background: var(--danger-color);
    color: white;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
}


/* HEADER */
.top-header {
    height: var(--header-height);
    background: rgba(15, 17, 26, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 10px 20px;
    width: 300px;
}

.header-search i {
    color: var(--text-muted);
    margin-right: 10px;
}

.header-search input {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 100%;
    outline: none;
}

.user-info-area {
    display: flex;
    align-items: center;
    gap: 30px;
}

.credit-badge {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.user-details {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--diamond-color);
}

.profile-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover;
}

.content-wrapper {
    padding: 40px;
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}


.content-section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.content-section.active {
    display: block !important;
}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.toast {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 350px;
    max-width: 90vw;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show {
    transform: translateX(0);
}
.toast-icon {
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toast-content h4 { font-size: 0.9rem; margin-bottom: 2px; }
.toast-content p { font-size: 0.8rem; color: var(--text-muted); }

/* MODAL STYLES */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    overflow-y: auto;
}
.modal-content {
    margin: 50px auto;
    width: 90%;
    max-width: 900px;
    position: relative;
    animation: modalFade 0.3s ease;
}
@keyframes modalFade { from {opacity:0; transform:scale(0.95);} to {opacity:1; transform:scale(1);} }
.close-modal {
    position: absolute; right: 20px; top: 15px;
    font-size: 1.5rem; color: var(--text-muted); cursor: pointer;
    transition: 0.3s; z-index: 10;
}
.close-modal:hover { color: white; }

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

.section-header {
    margin-bottom: 30px;
}

.section-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #a0aec0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    color: var(--text-muted);
}

/* NEW: DASHBOARD SECTION */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dashboard-chart h3, .important-messages h3, .quick-previews h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.mini-chart-wrapper {
    height: 250px;
    width: 100%;
}

.important-messages {
    display: flex;
    flex-direction: column;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    max-height: 250px;
}

.imp-message-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
}

.imp-msg-content h4 {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.imp-msg-content p {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 5px;
    line-height: 1.4;
}

.msg-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.quick-previews-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}


.quick-ad-item {
    min-width: 250px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

.quick-ad-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.quick-ad-item:hover img {
    transform: scale(1.05);
}

.quick-ad-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.quick-ad-info h4 {
    font-size: 0.9rem;
    margin: 0;
}


/* PROFILE SECTION */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.profile-left-col {
    display: flex;
    flex-direction: column;
}

.profile-right-col {
    display: flex;
    flex-direction: column;
}

/* Avatar Upload styling */
.avatar-card {
    text-align: center;
}
.avatar-upload-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}
.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.avatar-edit-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.avatar-edit-overlay:hover {
    background: rgba(0,0,0,0.8);
}


.membership-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tier-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--diamond-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.membership-card h3 {
    color: var(--diamond-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.membership-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.tier-benefits {
    list-style: none;
    text-align: left;
    width: 100%;
    margin-bottom: 30px;
}

.tier-benefits li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.tier-benefits li i {
    color: var(--accent-color);
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-form input, .custom-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.custom-select {
    appearance: none;
    cursor: pointer;
}
.custom-select option {
    background: var(--bg-color);
    color: white;
}

.profile-form input:focus, .custom-select:focus, .profile-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.2);
}

.profile-form input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* COMMUNICATION SECTION */
.communication-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    height: 600px;
}

.dept-sidebar {
    padding: 20px;
    overflow-y: auto;
    width: 250px;
    max-width: 100%;
}


.dept-sidebar h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.dept-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dept-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background: transparent;
    border: 1px solid transparent;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    color: var(--text-main);
}

.dept-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dept-btn.active {
    background: rgba(107, 70, 193, 0.15);
    border-color: rgba(107, 70, 193, 0.5);
}

.dept-icon {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: visible;
}

.dept-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* Avatar Image Styles */
.msg-avatar-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.mini-avatar {
    width: 40px;
    height: 40px;
}

.header-avatar {
    width: 35px;
    height: 35px;
    margin-right: 10px;
}

.message .msg-avatar-img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}


.dept-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.dept-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chat-area {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.chat-title {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.chat-cost {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 15px;
    max-width: 80%;
}

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-bubble {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px;
    border-top-left-radius: 0;
    line-height: 1.5;
}

.message.sent .msg-bubble {
    background: var(--primary-color);
    border-radius: 15px;
    border-top-right-radius: 0;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
}

.chat-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 15px 20px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
}

.chat-input-area input:focus {
    border-color: var(--primary-color);
}

/* AD STATS SECTION */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(107, 70, 193, 0.2);
    color: var(--primary-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-data h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-data span {
    font-size: 1.8rem;
    font-weight: 700;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}


.chart-container {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-container h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.chart-container canvas {
    flex: 1;
    width: 100% !important;
    height: 100% !important;
}

/* AD PREVIEWS SECTION */
.ad-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}


.ad-card {
    padding: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ad-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.active-status {
    background: rgba(0, 230, 118, 0.8);
    color: #000;
}

.pending-status {
    background: rgba(255, 171, 0, 0.8);
    color: #000;
}

.ad-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ad-card:hover .ad-image img {
    transform: scale(1.05);
}

.ad-details {
    padding: 20px;
}

.ad-details h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.ad-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.ad-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    background: rgba(0, 230, 118, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
    transition: background 0.3s;
    word-break: break-all;
}

.ad-link:hover {
    background: rgba(0, 230, 118, 0.2);
}

/* TOAST NOTIFICATION (LEFT SIDE) */
.toast-container {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(15, 17, 26, 0.9);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(-150%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    background: rgba(0, 230, 118, 0.2);
    color: var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.toast-content h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.toast-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* MODAL STYLES */
.modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
    from {opacity: 0; transform: scale(0.95);}
    to {opacity: 1; transform: scale(1);}
}

.modal-content {
    background: var(--bg-color);
    margin: auto;
    padding: 30px;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 1000px;
    border-radius: 20px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 25px;
    top: 20px;
}

.close-modal:hover,
.close-modal:focus {
    color: white;
    text-decoration: none;
}

.modal-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 40px;
}

.ad-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.ad-info-side img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
}

.ad-meta-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 12px;
}

.meta-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

.meta-item div {
    display: flex;
    flex-direction: column;
}

.meta-item strong {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-item span {
    font-size: 1rem;
    font-weight: 500;
}

.ad-stats-side {
    display: flex;
    flex-direction: column;
}

.modal-chart-container {
    height: 250px;
    width: 100%;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 15px;
}

.ad-content-text h3 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.glass-text-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 12px;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.6;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

@media (max-width: 900px) {
    /* Layout */
    .sidebar {
        left: -100%;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }
    .sidebar.mobile-active {
        left: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .header-search {
        display: none;
    }
    .content-wrapper {
        padding: 20px;
    }
    .top-header {
        padding: 0 20px;
    }
    .user-name, .user-role {
        display: none;
    }

    /* Grids */
    .dashboard-main-grid,
    .profile-grid,
    .communication-grid,
    .stats-overview,
    .charts-grid,
    .support-grid,
    .accounts-grid,
    .ad-detail-grid {
        grid-template-columns: 1fr;
    }

    /* Chat Specifics */
    .communication-grid {
        height: auto;
        display: flex;
        flex-direction: column;
    }
    .dept-sidebar {
        max-height: 200px;
    }
    .chat-area {
        height: 500px;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-right: 30px;
    }
    
    /* Stats */
    .stat-box {
        flex-direction: column;
        text-align: center;
    }
    .stat-icon {
        margin: 0 auto;
    }
}

/* NEW: AUTH PAGES (LOGIN / REGISTER) */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-card {
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
}

.input-with-icon input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 15px 15px 15px 45px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.input-with-icon input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.2);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.auth-options a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-options a:hover {
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    justify-content: center;
    padding: 15px;
    font-size: 1.1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

/* NEW: SUPPORT GRID */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    gap: 20px;
}

@media (min-width: 768px) {
    .support-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 25px;
    }
}

@media (min-width: 1200px) {
    .support-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 35px;
    }
    .support-card {
        padding: 45px !important;
    }
}




.support-card {
    display: flex;
    flex-direction: column;
}

.support-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.support-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.support-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ACCOUNTS SECTION */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}


.account-card {
    display: flex;
    flex-direction: column;
}

.acc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.acc-platform-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.acc-platform-icon.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.acc-platform-icon.facebook { background: #1877f2; }
.acc-platform-icon.tiktok { background: #000000; border: 1px solid rgba(255,255,255,0.2); }
.acc-platform-icon.google { background: #ea4335; }

.acc-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.suspended-status {
    background: rgba(255, 71, 87, 0.2);
    color: var(--danger-color);
    border: 1px solid rgba(255, 71, 87, 0.5);
}

.new-account-requests {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.request-acc-btn {
    display: flex;
    align-items: center;
    gap: 10px;
}
.request-acc-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* RESPONSIVENESS IMPROVEMENTS */
@media (max-width: 1200px) {
    .dashboard-main-grid, .charts-grid, .communication-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    .dept-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        max-height: 250px;
    }
    .chat-area {
        height: 600px;
    }
}


@media (max-width: 1024px) {
    :root { --sidebar-width: 240px; }
    .content-wrapper { padding: 25px; }
    .profile-grid { grid-template-columns: 1fr; }
    .stats-overview { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .sidebar {
        left: -100%;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }
    .sidebar.mobile-active {
        left: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .top-header {
        padding: 0 20px;
    }
    .header-search {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        background: rgba(255,255,255,0.05);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        font-size: 1.2rem;
        cursor: pointer;
        color: white;
    }
}

@media (max-width: 600px) {
    .stats-overview {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    .section-header h1 {
        font-size: 1.6rem;
    }
    .content-wrapper {
        padding: 15px !important;
    }
    .user-info-area {
        gap: 10px;
    }
    .user-details {
        display: none;
    }
    .credit-badge {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .toast {
        width: 90%;
        right: 5%;
    }
    .glass-card {
        padding: 15px !important;
        width: 100% !important;
    }
    .stat-data span {
        font-size: 1.4rem;
    }
    .nav-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    .main-content {
        padding-top: 0;
    }
    .ad-image {
        height: 160px;
    }
    /* Communication mobile tweaks */
    .dept-btn {
        padding: 10px;
    }
    .dept-icon {
        width: 35px;
        height: 35px;
    }
    .chat-header {
        padding: 12px;
    }
    .chat-title {
        font-size: 1rem;
    }
    /* Fix horizontal scroll issue */
    .dashboard-container {
        width: 100vw;
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {
    .section-header h1 {
        font-size: 1.4rem;
    }
    .btn-primary, .btn-secondary {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    .stat-box {
        gap: 12px;
    }
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
}
