/* ========================================
   EVL Discord Bot CMS - Premium Glassmorphism Theme
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700&display=swap');

:root {
    /* Brand Colors - Rich & Vibrant */
    --discord-blurple: #5865F2;
    --discord-blurple-rgb: 88, 101, 242;
    --discord-blurple-dark: #4752C4;
    --discord-green: #3ba55d;
    --discord-green-rgb: 59, 165, 93;
    --discord-red: #ed4245;
    --discord-yellow: #faa61a;

    /* Accents */
    --accent-primary: #5865F2;
    --accent-secondary: #ff007f;
    /* Vibrant Pink/Magenta */
    --accent-gradient: linear-gradient(135deg, #5865F2 0%, #ff007f 100%);
    --accent-glow: 0 0 20px rgba(88, 101, 242, 0.5);

    /* Background Colors - Deep Dark */
    --bg-primary: #0f1014;
    /* Deepest black/blue */
    --bg-secondary: #18191c;
    --bg-tertiary: #202225;
    --border-secondary: rgba(255, 255, 255, 0.1);

    /* Glassmorphism Variables */
    --glass-bg: rgba(30, 31, 34, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --backdrop-blur: blur(12px);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b9bbbe;
    --text-muted: #96989d;

    /* Dimensions */
    --sidebar-width: 280px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Global Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(circle at 0% 0%, rgba(88, 101, 242, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(255, 0, 127, 0.1) 0%, transparent 50%);
    color: var(--text-secondary);
    overflow: hidden;
    height: 100vh;
}

/* Server Selector Styling */
/* Server Selector Styling - Premium Redesign */
.server-selector {
    padding: 24px 20px 12px 20px;
    width: 100%;
}

.server-selector select,
#server-select {
    width: 100%;
    padding: 14px 18px;
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(185, 187, 190, 0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.server-selector select:hover,
#server-select:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.server-selector select:focus,
#server-select:focus {
    outline: none;
    border-color: var(--discord-blurple);
    background-color: rgba(0, 0, 0, 0.2) !important;
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Login Screen - Enhanced */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-primary);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(88, 101, 242, 0.1) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-container {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 440px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
}

/* Login Form Spacing */
.login-form .form-group {
    margin-bottom: 24px;
}

.login-form button {
    width: 100%;
    margin-top: 16px;
    height: 48px;
    font-size: 16px;
}

/* Bot Invite Button fix */
.bot-invite-button {
    right: 20px;
    bottom: 20px;
    top: auto;
    transform: none;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* Sidebar - Premium Glass */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(15, 16, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    height: 100px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header h1 {
    font-size: 28px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.nav-menu {
    padding: 20px 16px;
    flex: 1;
    overflow-y: auto;
}

.tab-button {
    width: 100%;
    height: 54px;
    margin-bottom: 16px;
    padding: 0 24px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(4px);
}

.tab-button.active {
    background: rgba(88, 101, 242, 0.15);
    color: var(--accent-primary);
    font-weight: 600;
}

.tab-button.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-primary);
}

/* Sidebar Footer - Clean & Spacious */
.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 70px;
}

.sidebar-footer .bot-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-footer .status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--discord-green);
    box-shadow: 0 0 8px var(--discord-green);
    flex-shrink: 0;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.sidebar-footer .status-indicator.offline {
    background: var(--discord-red);
    box-shadow: 0 0 8px var(--discord-red);
}

.sidebar-footer .status-text {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer button {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-footer button:hover {
    background: rgba(237, 66, 69, 0.15);
    border-color: rgba(237, 66, 69, 0.3);
    color: var(--discord-red);
    transform: scale(1.05);
}

/* Main Content */
.main-content {
    flex: 1;
    background: transparent;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.section-header {
    height: 90px;
    background: rgba(15, 16, 20, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-actions button,
.header-actions select {
    height: 38px !important;
    /* Force unison height */
    padding: 0 16px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.content-area {
    padding: 40px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    /* Allow expansion */
}

/* Cards & Containers - Glassmorphism */
.card,
.stat-card,
.shop-card,
.task-card,
.section-card,
.notification,
.modal-content,
.embed-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
    padding: 32px;
    /* Increased padding */
    margin-bottom: 24px;
}

.stat-card:hover,
.shop-card:hover,
.task-card:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Form Elements - Modern */
.form-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 12px 16px;
    transition: all var(--transition-fast);
}

.form-control:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
    outline: none;
}

/* Buttons - Gradients & Glows */
.btn-primary {
    background: var(--discord-blurple);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
    transition: all var(--transition-fast);
    padding: 12px 24px;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #3ba55d 0%, #2d8a47 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(59, 165, 93, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Discord Login Button */
.btn-discord {
    background-color: #5865F2;
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
    transition: all var(--transition-fast);
}

.btn-discord:hover {
    background-color: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.5);
}

.btn-large {
    width: 100%;
    padding: 14px 24px !important;
    font-size: 16px !important;
    height: auto !important;
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-divider span {
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Utils needed for JS compatibility */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Dashboard Grid */
.dashboard-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    background: linear-gradient(to right, #fff, #b9bbbe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tables */
.table-container {
    background: var(--glass-bg);
    border-radius: 16px;
    border: var(--glass-border);
    overflow: hidden;
    width: 100%;
    padding: 0;
    /* Let table fill it */
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(0, 0, 0, 0.2);
}

th {
    padding: 16px 24px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-muted);
}

tbody td {
    padding: 16px 24px;
}

tbody td button {
    margin: 0 4px;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Modals */
/* Modals - Fixed Centering */
.modal {
    position: fixed;
    /* Fix to viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    /* High z-index */
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    /* Hidden by default */
    overflow-y: auto;
    /* Allow scrolling if content is tall */
    padding: 40px 0;
    /* Add vertical breathing room */
}

/* Flex centering wrapper for modal content */
.modal-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    /* or flex-start for long content */
    min-height: 100%;
}

.modal-content {
    background: #18191c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 5% auto;
    /* Fallback for no flex */
    width: 90%;
    max-width: 600px;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Preserve original Discord preview styling exactly as it's specific */
.discord-preview-box {
    background-color: #36393f;
}

.discord-preview-label {
    color: #b9bbbe;
}

.discord-message-username {
    color: #ffffff;
}

.discord-message-content {
    color: #dcddde;
}

.discord-embed {
    background-color: #2f3136;
    border-left: 4px solid #202225;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        position: fixed;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        width: 100vw;
        left: 0;
    }

    .section-header {
        padding: 0 20px;
    }

    .content-area {
        padding: 20px;
    }
}

/* Loading Animation */
.loading {
    padding: 60px;
    text-align: center;
    color: var(--text-muted);
}

.loading::after {
    content: " ⏳";
    animation: spin 2s linear infinite;
    display: inline-block;
}

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

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.pagination-controls button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-controls button:hover:not(:disabled) {
    background: var(--discord-blurple);
    border-color: var(--discord-blurple);
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-muted);
}

/* Ad Banner Footer Position */
.evl-ad-banner-dc {
    margin-top: auto;
}

/* ========== MODAL UI IMPROVEMENTS ========== */

/* Wider modals for complex content */
.modal-content {
    background: #18191c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 5vh auto;
    /* 5vh from top */
    padding: 0;
    width: 90vw;
    /* Use Viewport Width */
    max-width: 1400px;
    /* Highly increased max-width */
    position: relative;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    /* Prevent going off screen */
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header,
.close {
    /* Ensure close button and header are styled if present */
    padding: 15px 25px;
    border-bottom: 1px solid var(--border-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

/* User Management Modal Specifics */
#user-management-modal .modal-content {
    max-width: 600px;
}

.modal-section {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
}

.modal-section h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-secondary);
    padding-bottom: 5px;
}

/* Role Management Grid */
#user-roles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin-bottom: 15px;
}

#user-roles-container label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

#user-roles-container label:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Announcement & Embed Split Layout */
.modal-split-layout {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.editor-column {
    flex: 1;
    min-width: 300px;
}

.preview-column {
    flex: 1;
    min-width: 300px;
    background: #313338;
    /* Discord dark theme bg */
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.discord-preview-label {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    color: #b9bbbe;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* Discord Preview Box Styling */
.discord-message {
    display: flex;
    margin-top: 5px;
}

.discord-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5865F2;
    /* Default avatar color */
    margin-right: 16px;
    flex-shrink: 0;
}

.discord-message-content {
    flex: 1;
}

/* Fix squished cards */
.shop-card,
.task-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 250px;
}

.shop-card p,
.task-card p {
    flex-grow: 1;
    margin: 10px 0;
    line-height: 1.5;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
}

/* Fix Server Selector Text Color */
#server-select {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

#server-select option {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 10px;
}

/* Fix Modal Widths and Positioning */
.modal {
    padding-top: 50px;
    /* Ensure space from top */
    align-items: flex-start;
    /* Start from top, not center (allows scrolling) */
}

/* OVERRIDE: Ensure Modals are Huge */
.modal-content,
#announcement-modal .modal-content,
#embed-modal .modal-content,
#user-management-modal .modal-content {
    max-width: 1400px !important;
    width: 90vw !important;
}

/* Ensure editor/preview columns stack on mobile but side-by-side on desktop */
.modal-split-layout {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
}

.editor-column,
.preview-column {
    flex: 1 1 50%;
    min-width: 400px;
}

@media (max-width: 768px) {
    .modal-split-layout {
        flex-direction: column;
    }
}

/* .discord-message-username is above, removed duplicate incomplete block */

.discord-message-timestamp {
    font-size: 12px;
    color: #72767d;
    margin-left: 5px;
    font-weight: 400;
}

.discord-embed {
    border-left: 4px solid #202225;
    background-color: #2f3136;
    border-radius: 4px;
    padding: 8px 16px 16px 12px;
    margin-top: 8px;
    max-width: 520px;
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: auto;
}

.discord-embed-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.discord-embed-description {
    font-size: 14px;
    color: #dcddde;
    line-height: 1.4;
    white-space: pre-wrap;
}

.discord-embed-footer {
    font-size: 12px;
    color: #dcddde;
    margin-top: 8px;
}

.discord-embed-image {
    max-width: 100%;
    border-radius: 4px;
    margin-top: 10px;
}

.discord-embed-thumbnail {
    max-width: 80px;
    max-height: 80px;
    border-radius: 4px;
    margin-left: 16px;
}

/* ========================================
   COMPREHENSIVE MODAL OVERHAUL - SPACIOUS & CLEAN
   ======================================== */

/* Modal Overlay - Full screen with blur */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    overflow-y: auto;
    padding: 40px 20px;
}

/* Modal Content - SPACIOUS */
.modal-content {
    background: linear-gradient(180deg, #1e1f22 0%, #18191c 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    width: 90vw;
    max-width: 900px;
    margin: 20px auto;
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

/* Larger modals for complex content */
#embed-modal .modal-content,
#announcement-modal .modal-content {
    max-width: 1200px;
}

/* Modal Header */
.modal-content h2 {
    background: rgba(0, 0, 0, 0.3);
    margin: 0;
    padding: 24px 32px;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Close Button */
.modal-content .close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 32px;
    color: #72767d;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
    z-index: 10;
}

.modal-content .close:hover {
    color: #fff;
    transform: scale(1.1);
}

/* Modal Body - SPACIOUS PADDING */
.modal-body {
    padding: 32px 40px 40px 40px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* Form Groups - More Breathing Room */
.modal-body .form-group {
    margin-bottom: 24px;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #b9bbbe;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-body .form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-body .form-control:focus {
    border-color: var(--discord-blurple);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
    outline: none;
}

.modal-body textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.modal-body small {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #72767d;
}

/* Button Group - Spacious */
.button-group {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.button-group button {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

/* Split Layout for Embed/Announcement Modals */
.modal-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
}

.editor-column {
    display: flex;
    flex-direction: column;
}

.preview-column {
    background: #313338;
    border-radius: 12px;
    padding: 24px;
    min-height: 400px;
}

@media (max-width: 1000px) {
    .modal-split-layout {
        grid-template-columns: 1fr;
    }

    .preview-column {
        order: -1;
    }
}

/* Server Management Section Styling */
.server-management-section {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.server-management-section h3 {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.server-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.server-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.server-item:hover {
    background: rgba(0, 0, 0, 0.3);
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.server-name {
    font-weight: 600;
    color: #fff;
    font-size: 16px;
}

.server-id,
.server-members {
    font-size: 13px;
    color: #72767d;
}

.tier-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.tier-free {
    background: rgba(114, 118, 125, 0.3);
    color: #b9bbbe;
}

.tier-premium {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #000;
}

.server-actions {
    display: flex;
    gap: 10px;
}

.server-actions button {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-leave-server {
    background: rgba(237, 66, 69, 0.2);
    color: #ed4245;
    border: 1px solid rgba(237, 66, 69, 0.3);
}

.btn-leave-server:hover {
    background: rgba(237, 66, 69, 0.4);
}

/* Ensure all buttons are clickable */
button,
.btn-primary,
.btn-success,
.btn-secondary,
.btn-danger {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Header Action Buttons - Ensure Clickable */
.header-actions button {
    position: relative;
    z-index: 10;
}

/* Bot Invite Button on Login Screen */
.bot-invite-button {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--discord-blurple), var(--discord-green));
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.4);
    transition: all var(--transition-normal);
    z-index: 10001;
}

.bot-invite-button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 32px rgba(88, 101, 242, 0.6);
}

.bot-invite-button svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Server Management Section */
.server-management-section {
    margin-top: 32px;
    padding: 24px;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-radius: 16px;
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.server-management-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.server-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.server-item {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
    gap: 20px;
    height: 100%;
}

.server-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
    border-color: var(--discord-blurple);
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.server-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.server-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.server-actions button {
    flex: 1;
    height: 36px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.server-actions {
    display: flex;
    gap: 12px;
}

.btn-leave-server {
    height: 36px;
    padding: 0 16px;
    background-color: transparent;
    border: 1px solid var(--discord-red);
    color: var(--discord-red);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-leave-server:hover {
    background-color: var(--discord-red);
    color: var(--text-primary);
}

.server-list::-webkit-scrollbar {
    width: 8px;
}

.server-list::-webkit-scrollbar-track {
    background-color: var(--bg-tertiary);
    border-radius: 4px;
}

.server-list::-webkit-scrollbar-thumb {
    background-color: var(--border-secondary);
    border-radius: 4px;
}

/* Embeds List Container - Clean organized wrapper */
.embeds-list-container {
    background: rgba(30, 31, 34, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

/* Embed Grid Fix */
.embeds-grid,
.shop-grid,
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 28px;
    width: 100%;
}

/* Embed Card - Improved spacing */
.embed-card {
    padding: 24px;
    margin-bottom: 0;
    /* Remove bottom margin since grid gap handles spacing */
}

.embed-card .embed-preview {
    padding: 16px;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.embed-card .embed-preview h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.embed-card .embed-preview p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.embed-card .embed-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.embed-card .embed-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.empty-server-list {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   EvolvedLotus Ad Banner — Discord Dashboard
   ============================================ */
.evl-tile-container {
    margin: 20px 0;
}

.evl-tile-dc {
    position: relative;
    padding: 14px 16px;
    border-radius: 14px;
    background: #111318;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Inter', -apple-system, sans-serif;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    opacity: 0;
    transform: translateY(4px);
    animation: evlTileFadeIn 0.4s ease 0.1s forwards;
    overflow: hidden;
}

@keyframes evlTileFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.evl-tile-dc:hover {
    border-color: var(--evl-accent, rgba(255, 255, 255, 0.1));
    box-shadow: 0 0 20px -4px var(--evl-glow, rgba(255, 255, 255, 0.04));
}

.evl-tile-dc::before {
    content: '';
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--evl-accent, #33bdef);
    opacity: 0.5;
    transition: opacity 0.25s;
}

.evl-tile-dc:hover::before {
    opacity: 0.9;
}
/* Tier Badges */
.tier-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 8px;
    vertical-align: middle;
}

.tier-free {
    background-color: #7289da;
    color: white;
}

.tier-premium {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: black;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* Usage Progress Bars */
.usage-meter {
    margin-top: 10px;
    background: #40444b;
    border-radius: 4px;
    height: 6px;
    width: 100%;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    background: #5865F2;
    transition: width 0.3s ease;
}

.usage-fill.warning {
    background: #faa61a;
}

.usage-fill.danger {
    background: #ed4245;
}

/* ========== CHANNEL LOCK SCHEDULES (Premium Feature) ========== */

/* Premium Section Header */
.premium-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.premium-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.premium-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Schedule Cards */
.schedule-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all var(--transition-fast);
}

.schedule-card:hover {
    border-color: var(--discord-blurple);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.15);
}

.schedule-card.schedule-disabled {
    opacity: 0.6;
    background: var(--bg-secondary);
}

/* Schedule Header */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.schedule-channel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-icon {
    color: var(--text-muted);
    font-size: 14px;
}

.channel-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Schedule State Badges */
.schedule-state {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.state-locked {
    background: rgba(237, 66, 69, 0.2);
    color: #ed4245;
}

.state-unlocked {
    background: rgba(87, 242, 135, 0.2);
    color: #57f287;
}

.state-error {
    background: rgba(250, 166, 26, 0.2);
    color: #faa61a;
}

/* Schedule Times */
.schedule-times {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px;
    background: rgba(24, 25, 28, 0.5);
    border-radius: 12px;
    margin-bottom: 12px;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.time-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.time-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Monaco', 'Consolas', monospace;
}

.time-arrow {
    color: var(--text-muted);
    font-size: 20px;
}

/* Schedule Meta */
.schedule-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.schedule-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Schedule Error */
.schedule-error {
    background: rgba(237, 66, 69, 0.15);
    border: 1px solid rgba(237, 66, 69, 0.3);
    color: #ed4245;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 12px;
}

/* Schedule Actions */
.schedule-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid var(--border-primary);
    padding-top: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-sm.btn-warning {
    background: #faa61a;
    color: #000;
}

.btn-sm.btn-warning:hover {
    background: #d99418;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    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: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    transition: .3s;
}

input:checked+.slider {
    background-color: var(--discord-green);
    border-color: var(--discord-green);
}

input:checked+.slider:before {
    background-color: white;
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Day Checkboxes */
.days-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.checkbox-label:hover {
    border-color: var(--discord-blurple);
}

.checkbox-label input[type="checkbox"]:checked+* {
    color: var(--discord-blurple);
}

/* Alert Warning */
.alert-warning {
    background: rgba(250, 166, 26, 0.15);
    border: 1px solid rgba(250, 166, 26, 0.3);
    color: #faa61a;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 15px;
}

/* Premium Upgrade Prompt */
.premium-upgrade-prompt {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(255, 215, 0, 0.1));
    border: 1px dashed var(--discord-blurple);
    border-radius: 12px;
    padding: 40px 30px;
}

.premium-upgrade-prompt h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Empty State */
.empty-state {
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px dashed var(--border-secondary);
}

/* ========== SETTINGS PAGE FIXES ========== */

/* Multi-select role dropdowns - constrain height and make scrollable */
select[multiple].form-control,
#admin-roles,
#moderator-roles,
select[size] {
    max-height: 150px !important;
    min-height: 120px !important;
    height: auto !important;
    overflow-y: auto !important;
    padding: 8px !important;
    font-size: 13px !important;
}

select[multiple].form-control option,
#admin-roles option,
#moderator-roles option {
    padding: 6px 10px;
    margin: 2px 0;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

select[multiple].form-control option:checked,
#admin-roles option:checked,
#moderator-roles option:checked {
    background: linear-gradient(0deg, var(--discord-blurple) 0%, var(--discord-blurple) 100%);
    color: white;
}

/* Settings grid - better responsiveness */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

/* Section cards - consistent styling */
.section-card {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-radius: 16px;
    border-radius: 16px;
    padding: 40px;
    border: var(--glass-border);
    margin-bottom: 0;
}

.section-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-primary);
}

/* Form groups - tighter spacing */
.section-card .form-group {
    margin-bottom: 20px;
}

.section-card .form-group:last-child {
    margin-bottom: 0;
}

.section-card .form-group label {
    font-size: 12px;
    margin-bottom: 8px;
}

.section-card .form-control {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 14px;
}

.section-card .btn-primary.btn-small,
.section-card .btn-small {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    margin-top: 8px;
}

/* Inline save buttons next to selects */
.section-card .form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Server Management Grid */
.server-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 12px !important;
    max-height: none !important;
    overflow: visible !important;
    flex-direction: unset !important;
}

.server-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
}

.server-info {
    width: 100%;
}

.server-name {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.server-actions {
    width: 100%;
    justify-content: flex-end;
}

/* Moderation Exemptions - compact multi-selects */
#file-image-exempt-roles,
#link-exempt-roles,
#global-exempt-roles,
[id*="exempt-roles"] {
    max-height: 120px !important;
    font-size: 12px !important;
}

/* Config content area spacing */
#config-content {
    padding: 20px 24px;
}

#config-content>.section-card,
#config-content>div[style*="margin-top"] {
    margin-bottom: 20px;
}

/* Whop Integration section */
#whop-info-section .card,
#api-clients-section .card {
    padding: 16px;
}

#whop-info-section .form-group,
#api-clients-section .form-group {
    margin-bottom: 12px;
}

/* Bot Status Configuration compact */
#bot-status-section {
    padding: 16px 24px;
}

/* Bot Status Config - Cleaner Layout */
.bot-status-control {
    display: flex;
    flex-direction: column;
    /* Stack vertically for clarity */
    gap: 24px;
    width: 100%;
}

.bot-status-control .form-row {
    display: flex;
    gap: 24px;
    width: 100%;
    align-items: flex-start;
}

.bot-status-control .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bot-status-control textarea,
.bot-status-control input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.bot-status-control button {
    align-self: flex-start;
    /* Don't stretch */
    padding: 12px 32px;
    height: 48px;
}

/* Channel Schedules section - ensure visibility */
#channel-schedules-section {
    margin-top: 20px !important;
}

.premium-feature-section {
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.05) 0%, transparent 100%);
}

/* Checkbox labels in settings */
.section-card label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--discord-blurple);
}

/* Feature toggles - horizontal layout */
.section-card .form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
}

/* Small text helper */
.section-card small {
    font-size: 11px;
    color: var(--text-dark);
    margin-top: 4px;
}

/* Server tier badges inline */
.tier-badge {
    font-size: 9px;
    padding: 2px 6px;
    vertical-align: middle;
}

/* Scrollable content areas */
.content-area {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 30px 40px 60px;
}

/* Fix for cut-off elements */
.main-content {
    overflow-y: auto;
    overflow-x: hidden;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .server-list {
        grid-template-columns: 1fr !important;
    }

    .bot-status-control {
        grid-template-columns: 1fr;
    }
}

/* Loading states in settings */
#config-content .loading {
    padding: 40px;
    text-align: center;
}

/* ========== MODERATION SETTINGS FIXES ========== */

/* Role selector containers - constrained height */
.role-selector {
    max-height: 150px !important;
    min-height: 100px;
    overflow-y: auto !important;
    padding: 8px !important;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 6px;
    margin-bottom: 8px;
}

.role-checkbox-item {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    margin: 2px 0;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.role-checkbox-item:hover {
    background: var(--bg-hover);
}

.role-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: var(--discord-blurple);
    cursor: pointer;
}

.role-checkbox-item label {
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Moderation settings card */
#moderation-settings-card {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
}

#moderation-settings-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-primary);
}

#moderation-settings-card>p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

#moderation-settings-card .form-group {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

#moderation-settings-card .form-group>label:first-of-type {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: block;
}

#moderation-settings-card .checkbox-group {
    margin: 8px 0;
}

#moderation-settings-card small,
#moderation-settings-card .text-muted {
    font-size: 11px;
    color: var(--text-dark);
    display: block;
    margin-top: 6px;
}

/* Bot Status Section compact */
#bot-status-section .form-group {
    margin-bottom: 12px;
}

/* Server Management compact cards */
.server-management-section {
    padding: 16px;
}

.server-management-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

/* Whop section compact */
#whop-info-section,
#api-clients-section {
    padding: 16px 20px;
}

#whop-info-section h3,
#api-clients-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

/* Channel Schedules Premium Section */
#channel-schedules-section h3 {
    font-size: 16px;
}

/* Fix for extremely long text in sections */
.section-card,
.card,
#moderation-settings-card {
    overflow: hidden;
}

/* Scrollable settings sections */
.settings-grid {
    padding-right: 4px;
}

/* Compact helper text */
small.text-muted,
.form-group small {
    line-height: 1.4;
}

/* Increase gap for action buttons */
.header-actions {
    gap: 16px !important;
}

/* Ensure card headers have breathing room */
.card h2,
.card h3,
.section-card h2,
.section-card h3 {
    margin-bottom: 24px;
}

/* Mobile Responsive Styles for EVL Discord Bot CMS */
/* CRITICAL: Ensures mobile compatibility without breaking desktop */

/* ===================================
   MOBILE VIEWPORT FIX
   =================================== */
/* Prevent zoom on input focus (iOS Safari fix) */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* ===================================
   LOGIN SCREEN - MOBILE OPTIMIZED
   =================================== */
@media (max-width: 1024px) {

    /* Fix login screen for mobile/tablet */
    .login-screen {
        padding: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .login-container {
        width: 100%;
        max-width: 100%;
        padding: 30px 20px;
        margin: 0 auto;
        box-shadow: none;
    }

    .login-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        word-break: break-word;
    }

    .login-header p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .login-form {
        gap: 16px;
    }

    /* Form inputs - CRITICAL for mobile */
    .login-form input[type="text"],
    .login-form input[type="password"] {
        width: 100%;
        min-height: 48px;
        font-size: 16px !important;
        padding: 14px 16px;
        border-radius: 8px;
        -webkit-appearance: none;
        appearance: none;
    }

    /* Login button */
    .login-form button[type="submit"],
    .btn-large {
        width: 100%;
        min-height: 50px;
        font-size: 16px;
        padding: 14px 24px;
        border-radius: 8px;
        touch-action: manipulation;
    }

    /* Login error message */
    .login-error {
        font-size: 13px;
        padding: 12px;
        margin-top: 12px;
        word-break: break-word;
    }

    /* Bot invite button on login */
    .bot-invite-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

/* Notification Toasts */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    min-width: 300px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left-width: 4px;
    font-size: 14px;
    font-weight: 500;
}

.toast.success {
    border-left-color: var(--discord-green);
}

.toast.error {
    border-left-color: var(--discord-red);
}

.toast.warning {
    border-left-color: var(--discord-yellow);
}

.toast.info {
    border-left-color: var(--discord-blurple);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================
   DASHBOARD - MOBILE LAYOUT
   =================================== */
@media (max-width: 1024px) {

    /* Sidebar becomes full-width overlay on mobile */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 85% !important;
        max-width: 320px !important;
        height: 100vh !important;

        /* Use transform for sliding - more reliable */
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out !important;

        z-index: 10000 !important;
        /* Higher than everything */
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;

        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;

        /* Glassmorphism for mobile sidebar */
        background: rgba(20, 20, 25, 0.95) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.1);

        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0) !important;
    }

    /* Main content takes full width on mobile */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        left: 0 !important;
        padding-bottom: 80px;
    }

    /* Mobile menu toggle button - HIGH VISIBILITY */
    .mobile-menu-toggle {
        display: flex !important;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 10001;
        /* Higher than sidebar */
        width: 48px;
        height: 48px;
        background-color: var(--discord-blurple);
        border: 2px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        color: white;
        font-size: 24px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }

    /* Overlay when mobile menu is open */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 9999;
        backdrop-filter: blur(2px);
    }

    .mobile-overlay.active {
        display: block;
    }

    /* Adjust section headers for mobile */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        height: auto;
        min-height: 80px;
        padding: 20px;
        padding-left: 75px;
        /* Space for toggle button */
    }

    .section-header h2 {
        font-size: 1.3rem;
        margin-top: 4px;
    }

    .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-actions button {
        flex: 1 1 auto;
        min-width: 120px;
    }

    /* ===================================
       SERVER SELECTOR - MOBILE OPTIMIZED
       =================================== */
    .server-selector {
        padding: 20px;
        background-color: var(--bg-tertiary);
        margin-bottom: 10px;
        border-bottom: 1px solid var(--border-primary);
    }

    .server-selector label {
        font-size: 14px;
        margin-bottom: 10px;
        color: var(--text-secondary);
    }

    .server-selector select {
        width: 100%;
        height: 50px;
        /* Large touch target */
        font-size: 16px !important;
        padding: 10px 15px;
        background-color: var(--bg-primary);
        color: white;
        border: 1px solid var(--discord-blurple);
        border-radius: 8px;
    }

    /* Sidebar Header */
    .sidebar-header {
        height: 70px;
        padding: 0 20px;
    }

    .sidebar-header h1 {
        font-size: 1.5rem;
    }

    /* Nav Buttons */
    .tab-button {
        height: 54px;
        /* Larger touch target */
        font-size: 16px;
        padding: 0 20px;
        margin-bottom: 4px;
    }

    /* ===================================
       FORMS & INPUTS - MOBILE FRIENDLY
       =================================== */

    /* ALL inputs must be 16px to prevent iOS zoom */
    input,
    select,
    textarea,
    .form-control {
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 12px 16px;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
    }

    /* Stack form groups vertically */
    .form-row {
        flex-direction: column;
    }

    .form-group {
        width: 100% !important;
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 14px;
        margin-bottom: 8px;
        display: block;
    }

    /* ===================================
       BUTTONS - LARGER TOUCH TARGETS
       =================================== */

    button,
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-success,
    .btn-danger,
    .btn-warning {
        min-height: 48px !important;
        padding: 12px 20px;
        font-size: 15px;
        border-radius: 8px;
        touch-action: manipulation;
    }

    .btn-small {
        min-height: 40px !important;
        font-size: 14px;
    }

    /* ===================================
       MODALS - MOBILE OPTIMIZED
       =================================== */

    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px auto;
        max-height: 92vh;
        overflow-y: auto;
        border-radius: 12px;
        padding-bottom: 20px;
    }

    .modal-content h2 {
        font-size: 1.2rem;
        padding: 20px;
        position: sticky;
        top: 0;
        background-color: var(--bg-tertiary);
        z-index: 10;
        border-bottom: 1px solid var(--border-primary);
    }

    .modal-body {
        padding: 20px;
    }

    .close {
        top: 15px;
        right: 15px;
        font-size: 32px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 20;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 50%;
    }

    /* ===================================
       TABLES - HORIZONTAL SCROLL
       =================================== */

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-radius: 8px;
        border: 1px solid var(--border-primary);
    }

    table {
        min-width: 700px;
        /* Ensure table doesn't squash */
    }

    th,
    td {
        padding: 16px;
        /* Larger touch targets in table */
    }

    /* ===================================
       GRIDS - SINGLE COLUMN ON MOBILE
       =================================== */

    .stats-grid,
    .dashboard-grid,
    .shop-grid,
    .grid-container,
    .embeds-grid,
    .roles-grid,
    .moderation-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* ===================================
       CONTENT AREAS
       =================================== */

    .content-area {
        padding: 20px 16px;
    }

    /* ===================================
       CARDS - MOBILE FRIENDLY
       =================================== */

    .stat-card,
    .shop-card,
    .task-card {
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .stat-card h3 {
        font-size: 13px;
    }

    .stat-value {
        font-size: 32px;
    }
}

/* ===================================
   HIDE MOBILE ELEMENTS ON DESKTOP
   =================================== */
@media (min-width: 1025px) {
    .mobile-menu-toggle {
        display: none !important;
    }

    .mobile-overlay {
        display: none !important;
    }
}

/* ===================================
   VERY SMALL SCREENS (< 480px)
   =================================== */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    .login-container {
        padding: 24px 16px;
    }

    .login-header h1 {
        font-size: 1.3rem;
    }

    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }

    .section-header {
        padding: 16px;
        padding-left: 70px;
    }

    .content-area {
        padding: 16px 12px;
    }

    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        top: 12px;
        left: 12px;
    }
}

/* ===================================
   LAYOUT FIX V2: NATURAL PAGE FLOW
   =================================== 
   - Page expands to show all content
   - Only data lists scroll internally
   - Main scrollbar is on the page, not containers
*/

/* Body/Dashboard structure - sidebar fixed, content scrolls */
body {
    overflow: hidden;
    height: 100vh;
}

.dashboard-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar stays fixed */
.sidebar {
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
}

/* Main content is the ONLY scrollable area */
.main-content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Content area - let it be as tall as needed */
.content-area {
    padding: 40px 48px 100px 48px;
    min-height: auto;
}

/* Tab content - NO height restrictions, flow naturally */
.tab-content {
    min-height: auto;
    height: auto;
}

/* ===================================
   ALL CONTAINERS FLOW NATURALLY
   =================================== */

/* Section cards, settings panels - NO scroll, NO fixed height */
.section-card,
.card,
.settings-grid,
.config-content,
.settings-panel,
.premium-settings,
.form-section,
.settings-section,
#config-content,
#channel-schedules-list,
.premium-features,
.channel-lock-section {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Grids - flow naturally with good spacing */
.stats-grid,
.dashboard-grid,
.settings-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
}

/* Cards inside settings - consistent sizing */
.section-card {
    padding: 28px;
    margin-bottom: 24px;
}

.section-card:last-child {
    margin-bottom: 0;
}

/* ===================================
   ONLY THESE SHOULD SCROLL INTERNALLY
   =================================== */

/* Logs - always scrollable (can be very long) */
.logs-container,
#logs-container,
#system-logs-list {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* User/Member tables - scrollable when there are many */
.users-table-container,
.members-table-container,
#users-list,
#members-list {
    max-height: 600px;
    overflow-y: auto;
}

/* Transaction list - scrollable */
#transactions-list,
.transactions-table-container {
    max-height: 600px;
    overflow-y: auto;
}

/* Role containers (many roles) */
#user-roles-container,
.roles-grid-scrollable {
    max-height: 300px;
    overflow-y: auto;
}

/* Shop/Task grids - only scroll if many items */
.shop-grid,
.tasks-grid,
.embeds-grid {
    max-height: none;
    overflow: visible;
}

/* Modals keep their internal scroll (they're overlay windows) */
.modal-body {
    max-height: calc(85vh - 100px);
    overflow-y: auto;
}

/* ===================================
   MOBILE ADJUSTMENTS
   =================================== */
@media (max-width: 768px) {
    .content-area {
        padding: 20px 16px 60px 16px;
    }

    .section-card {
        padding: 20px;
        margin-bottom: 16px;
    }

    .stats-grid,
    .dashboard-grid,
    .settings-grid {
        gap: 16px;
    }
}

/* ===================================
   SPECIFIC TAB CONTENT FIXES
   =================================== */

/* Config tab content - ensure all sections show */
#config .content-area,
#config-content,
#settings .content-area,
#server-settings .content-area {
    height: auto !important;
    overflow: visible !important;
}

/* Settings grid - 2 column on desktop, stack on mobile */
.settings-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Ensure form groups have breathing room */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Button spacing in settings */
.section-card .btn-primary,
.section-card .btn-secondary {
    margin-top: 16px;
}

/* ========== SITE FOOTER - TOS/PRIVACY COMPLIANCE ========== */

.site-footer {
    text-align: center;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-shrink: 0;
}

/* Login page variant: anchored to bottom of the viewport */
.site-footer--login {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

/* Dashboard variant: sits at bottom of main-content scroll area */
.site-footer--dashboard {
    margin-top: auto;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.site-footer__links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.site-footer__links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color var(--transition-fast);
}

.site-footer__links a:hover {
    color: var(--accent-primary);
}

.site-footer__separator {
    color: rgba(255, 255, 255, 0.15);
    font-size: 10px;
    user-select: none;
}

.site-footer__copy {
    color: rgba(150, 152, 157, 0.6);
    font-size: 11px;
    margin: 0;
}

/* Mobile: stack footer links vertically if needed */
@media (max-width: 480px) {
    .site-footer__links {
        gap: 6px;
    }

    .site-footer__links a {
        font-size: 11px;
    }
}

/* ========================================
   AI SPECIFIC UI OVERRIDES AND FIXES
   ======================================== */

/* GLOBAL LAYOUT & SPACING */
html, body {
    height: 100vh;
    overflow: hidden;
}
.dashboard-container {
    height: 100vh;
    overflow: hidden;
}
.main-content {
    height: 100vh;
    overflow-y: auto;
}
.content-area {
    padding: 16px 20px !important;
    max-width: 1200px !important;
    margin: 0 auto;
}
.section-header {
    height: 90px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-header h2 {
    display: inline-flex;
    align-items: center;
    margin: 0;
}
#tier-badge-container {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.action-group-left, .action-group-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logs-header-actions {
    justify-content: space-between;
    width: 100%;
}

/* SIDEBAR REFINEMENTS */
.sidebar .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 !important;
}
.tab-button {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px !important;
    margin-bottom: 12px !important;
    border-radius: 50% !important;
}
.tab-button.active {
    background: transparent !important;
}
.tab-button.active::before {
    height: 44px !important;
    width: 4px !important;
    border-radius: 0 4px 4px 0 !important;
    left: -14px !important;
    background: var(--accent-primary) !important;
    box-shadow: none !important;
}
.tab-button:hover {
    background: rgba(255,255,255,0.08) !important;
    transform: none !important;
}
.server-selector {
    padding: 16px 14px !important;
}
#server-select {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    color: transparent !important;
    background-position: center !important;
}
.sidebar-footer {
    margin-top: auto;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    padding: 20px 0 !important;
}
#bot-status {
    flex-direction: column;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}
#sidebar-status-dot {
    width: 8px !important;
    height: 8px !important;
}
#sidebar-status-text {
    font-size: 11px !important;
    line-height: 11px;
}
.sidebar-footer button[onclick="logout()"] {
    border-top: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    width: 100%;
    margin-top: 8px;
    padding-top: 16px;
    background: transparent !important;
    border-left: none; border-right: none; border-bottom: none;
}

/* DASHBOARD STATS */
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
}
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.stat-card i {
    align-self: flex-start;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 32px !important;
    line-height: 1.2;
}
.stat-label {
    font-size: 13px !important;
    color: var(--text-secondary);
}

/* USERS & MODALS */
.user-card {
    cursor: pointer;
}
.coin-value {
    text-align: right;
    display: block;
}

/* SHOP LIST */
#shop-list .shop-card {
    display: flex;
    flex-direction: column;
    min-height: 140px;
}
.shop-card .price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--accent-primary);
}

/* TASKS LIST */
#tasks-list .task-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "desc badge" "desc reward";
    gap: 8px;
}
.task-card .task-desc { grid-area: desc; }
.task-card .task-badge { grid-area: badge; justify-self: end; }
.task-card .task-reward { grid-area: reward; justify-self: end; font-weight: bold; }

/* ANNOUNCEMENTS LIST */
#announcements-list .announcement-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}
.pinned-tag {
    background: var(--discord-yellow);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

/* EMBEDS LIST */
#embeds-list .embed-card {
    border-left: 4px solid var(--embed-color, #5865F2) !important;
    padding-left: 16px !important;
}
.embed-card .embed-desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}

/* LOGS */
#logs-content .log-entry {
    font-family: monospace;
    padding: 8px;
    border-left: 3px solid transparent;
    height: 36px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.log-entry.error { border-left-color: var(--discord-red); }
.log-entry.warning { border-left-color: var(--discord-yellow); }
.log-entry.info { border-left-color: var(--discord-blurple); }

/* CONFIG FORMS */
.config-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin: 16px 0;
}
.config-inline-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.config-inline-group select {
    width: 240px !important;
}
#bot-status-section {
    background: var(--glass-bg);
    padding: 24px;
    border-radius: 16px;
    border: var(--glass-border);
}
.premium-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 8px;
    background: linear-gradient(135deg, #FFD700, #FDB931);
    color: #000;
    margin-left: 8px;
}

/* MODALS */
.modal {
    background-color: rgba(0, 0, 0, 0.7) !important;
}
.modal-content {
    max-width: 560px !important;
    border: 1px solid var(--border-secondary) !important;
}
.modal-content.wide-modal {
    max-width: 860px !important;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}
label {
    display: block;
    margin-bottom: 4px;
}
.form-control {
    border-color: var(--border-secondary) !important;
}
.button-group {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}
.button-group .btn-secondary { background: transparent; }

/* FIX EMBED PREVIEW */
#preview-embed {
    max-width: 480px !important;
    background-color: #2b2d31 !important;
}
.discord-preview-box {
    background-color: #313338 !important; 
}

/* TOASTS */
#notification-container {
    position: fixed;
    bottom: 16px !important;
    right: 16px !important;
    top: auto !important;
    left: auto !important;
    z-index: 9999 !important;
}
.toast {
    width: 320px !important;
    display: flex;
    align-items: center;
}
.toast.error::before { content: "✕ "; font-weight: bold; margin-right: 8px; }
.toast.success::before { content: "✓ "; font-weight: bold; margin-right: 8px; }

/* FOOTERS */
.site-footer {
    display: flex;
    padding: 16px;
    align-items: center;
    justify-content: center;
}
.site-footer--dashboard {
    margin-top: auto;
}
.site-footer a {
    font-size: 11px;
    color: var(--text-muted);
}
