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

:root {
    --bg-base:       #080c14;
    --bg-surface:    #0d1117;
    --bg-card:       #111827;
    --bg-card2:      #161f2e;
    --bg-hover:      #1a2540;
    --border:        rgba(99, 179, 237, 0.08);
    --border-glow:   rgba(109, 91, 255, 0.3);

    --primary:       #6d5bff;
    --primary-light: #8875ff;
    --primary-dark:  #5444dd;
    --secondary:     #00d4ff;
    --accent:        #ff6b9d;
    --success:       #00e5a0;
    --warning:       #ffa825;
    --danger:        #ff4757;

    --text-primary:  #f0f4ff;
    --text-secondary:#8ba3c7;
    --text-muted:    #4a6080;

    --sidebar-w:     300px;
    --header-h:      72px;
    --radius-sm:     8px;
    --radius-md:     14px;
    --radius-lg:     20px;
    --radius-xl:     28px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 48px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(109,91,255,0.25);
    --shadow-cyan: 0 0 30px rgba(0,212,255,0.15);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', system-ui, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==============================
   Scrollbar
============================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(109,91,255,0.4); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ==============================
   Particles Background
============================== */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: float-particle linear infinite;
    opacity: 0;
}

@keyframes float-particle {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.4; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* ==============================
   App Layout
============================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ==============================
   SIDEBAR
============================== */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, #0e1520 0%, #0a1018 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) rgba(0, 0, 0, 0.4);
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.35);
}
.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
    box-shadow: 0 0 8px var(--secondary);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 300px;
    background: radial-gradient(ellipse at 50% 0%, rgba(109,91,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.logo-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.logo-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-sub {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ==============================
   SIDEBAR SECTIONS (UNIFIED)
============================== */
.sidebar-section {
    display: flex;
    flex-direction: column;
    padding: 12px 0 8px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 8px;
}

.section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 7px;
}
.section-title i {
    color: var(--secondary);
    font-size: 12px;
}

.btn-refresh {
    width: 26px;
    height: 26px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: var(--transition-fast);
}
.btn-refresh:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: rotate(45deg);
}
.spinning i {
    animation: fa-spin 0.8s infinite linear;
}

/* Add Item Box (Unified for Bots & Groups) */
.add-item-box {
    margin: 0 12px 8px;
    padding: 9px 11px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.add-item-label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.add-item-label i {
    color: var(--secondary);
    font-size: 11px;
}

.add-item-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.item-input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Outfit', monospace;
    font-size: 11.5px;
    padding: 7px 9px;
    outline: none;
    transition: var(--transition-fast);
    min-width: 0;
}
.item-input::placeholder {
    color: var(--text-muted);
    font-size: 11px;
}
.item-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.15);
}

.btn-add-item {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--secondary), #0ea5e9);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: var(--transition-bounce);
}
.btn-add-item:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.35);
}

.add-item-hint {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.add-item-hint a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}
.add-item-hint a:hover {
    text-decoration: underline;
}

/* Select All Row (Unified) */
.select-all-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    margin: 0 12px 6px;
    background: rgba(109, 91, 255, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glow);
}

.item-count {
    font-size: 10.5px;
    color: var(--secondary);
    font-weight: 700;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 11.5px;
    color: var(--text-secondary);
    user-select: none;
}
.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}
.checkbox-label input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}
.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

/* Item List (Scrollable container for Bots and Groups) */
.item-list {
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.item-list::-webkit-scrollbar {
    width: 4px;
}
.item-list::-webkit-scrollbar-thumb {
    background: rgba(109, 91, 255, 0.35);
    border-radius: 4px;
}
.item-list::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Empty State */
.no-items {
    text-align: center;
    padding: 16px 8px;
    color: var(--text-muted);
    font-size: 11.5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.12);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}
.no-items i {
    font-size: 20px;
    opacity: 0.5;
    margin-bottom: 2px;
}
.no-items p {
    margin: 0;
    font-size: 11px;
}
.no-items-hint {
    font-size: 10px;
    color: var(--secondary);
    opacity: 0.85;
}

/* Unified Sidebar Cards (Bots & Groups) */
.sidebar-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}
.sidebar-card:hover {
    background: var(--bg-hover);
    border-color: rgba(0, 212, 255, 0.3);
}
.sidebar-card.selected {
    background: rgba(109, 91, 255, 0.1);
    border-color: rgba(109, 91, 255, 0.35);
}

.card-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}
.bot-avatar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.type-group      { background: linear-gradient(135deg, #6d5bff, #a855f7); }
.type-supergroup { background: linear-gradient(135deg, #00d4ff, #0ea5e9); }
.type-channel    { background: linear-gradient(135deg, #ff6b9d, #f43f5e); }
.type-manual     { background: linear-gradient(135deg, #f59e0b, #d97706); }

.card-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.card-sub {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* Active Bot Highlight & Badges */
.sidebar-card.active-bot {
    background: linear-gradient(135deg, rgba(109, 91, 255, 0.16), rgba(0, 212, 255, 0.12));
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.22);
}

.bot-active-badge {
    background: linear-gradient(135deg, var(--secondary), #0ea5e9);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.bot-active-badge::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 3px #fff;
}

.bot-group-tag {
    font-size: 9.5px;
    color: var(--secondary);
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 1px 6px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Bot Mode Tabs (Single Bot vs All) */
.bot-mode-bar {
    display: flex;
    gap: 5px;
    margin: 0 12px 7px;
}
.btn-mode-tab {
    flex: 1;
    padding: 5px 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 10.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition-fast);
}
.btn-mode-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.btn-mode-tab.active {
    background: rgba(0, 212, 255, 0.14);
    border-color: var(--secondary);
    color: var(--secondary);
    font-weight: 600;
}

.bot-label-highlight {
    color: var(--secondary);
    font-weight: 700;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 5px var(--success);
}

.card-check {
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: transparent;
    flex-shrink: 0;
    transition: var(--transition-fast);
}
.sidebar-card.selected .card-check {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-edit-card {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition-fast);
    flex-shrink: 0;
    margin-left: 2px;
}
.btn-edit-card:hover {
    background: rgba(0, 212, 255, 0.18);
    color: var(--secondary);
}

.btn-remove-card {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition-fast);
    flex-shrink: 0;
    margin-left: 2px;
}
.btn-remove-card:hover {
    background: rgba(255, 77, 109, 0.18);
    color: var(--danger);
}

/* Sidebar Stats */
.sidebar-stats {
    display: flex;
    align-items: center;
    padding: 16px 20px 24px;
    border-top: 1px solid var(--border);
    gap: 12px;
    flex-shrink: 0;
    background: #0a1018;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    color: var(--text-secondary);
    font-size: 13px;
}

.stat-item i { color: var(--primary); font-size: 16px; }
.stat-num { display: block; font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 10px; color: var(--text-muted); }
.stat-divider { width: 1px; height: 30px; background: var(--border); }

/* ==============================
   MAIN CONTENT
============================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Header */
.main-header {
    height: var(--header-h);
    background: rgba(13,17,23,0.9);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0; z-index: 50;
    backdrop-filter: blur(20px);
}

.header-left { display: flex; align-items: center; gap: 16px; }

.btn-menu-toggle {
    display: none;
    width: 38px; height: 38px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center; justify-content: center;
    font-size: 15px;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.header-title p {
    font-size: 12px;
    color: var(--text-muted);
}

.header-time {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* ==============================
   TABS
============================== */
.tab-switcher {
    display: flex;
    gap: 8px;
    padding: 20px 28px 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(109,91,255,0.4);
}

/* ==============================
   PANELS
============================== */
.panel {
    display: none;
    padding: 20px 28px 28px;
    animation: fadeSlideUp 0.3s ease;
}
.panel.active { display: block; }

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

/* Panel Card */
.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.panel-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.card-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.text-icon  { background: linear-gradient(135deg, rgba(109,91,255,0.2), rgba(109,91,255,0.05)); color: var(--primary-light); border: 1px solid rgba(109,91,255,0.2); }
.photo-icon { background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(0,212,255,0.05)); color: var(--secondary); border: 1px solid rgba(0,212,255,0.2); }

.card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.card-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Format Bar */
.format-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: var(--bg-card2);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    flex-wrap: wrap;
}

.fmt-btn {
    width: 34px; height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition-fast);
}
.fmt-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.clear-btn:hover { background: rgba(255,71,87,0.15); color: var(--danger); }

.fmt-divider {
    width: 1px; height: 20px;
    background: var(--border);
    margin: 0 4px;
}

/* Textarea */
.textarea-wrapper {
    position: relative;
}

.message-textarea {
    width: 100%;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    padding: 16px;
    resize: vertical;
    min-height: 180px;
    transition: var(--transition);
    outline: none;
}

.message-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(109,91,255,0.15);
}

.message-textarea::placeholder { color: var(--text-muted); }

.char-count {
    text-align: right;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Preview */
.preview-section {
    margin-top: 16px;
    animation: fadeIn 0.3s ease;
}

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

.preview-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}

.preview-bubble {
    background: #1e2d3d;
    border-radius: 4px 14px 14px 14px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #fff;
    border-left: 3px solid var(--secondary);
    max-width: 480px;
    word-break: break-word;
}

/* Caption Input */
.caption-section {
    margin-top: 16px;
}

.input-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}

.caption-input {
    width: 100%;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    padding: 12px 16px;
    outline: none;
    transition: var(--transition);
}

.caption-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(0,212,255,0.15);
}

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

/* ==============================
   DROPZONE
============================== */
.dropzone {
    position: relative;
    border: 2px dashed var(--border-glow);
    border-radius: var(--radius-lg);
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    background: rgba(109,91,255,0.02);
}

.dropzone:hover,
.dropzone.drag-over {
    border-color: var(--primary);
    background: rgba(109,91,255,0.06);
    box-shadow: var(--shadow-glow);
}

.dropzone-content {
    text-align: center;
    padding: 30px;
}

.drop-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.drop-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.drop-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.drop-link {
    color: var(--secondary);
    cursor: pointer;
    text-decoration: underline;
}

.drop-types {
    font-size: 11px;
    color: var(--text-muted);
}

.dropzone-preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.dropzone-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
    padding: 16px;
}

.preview-overlay {
    position: absolute;
    top: 12px; right: 12px;
}

.btn-remove-img {
    width: 32px; height: 32px;
    background: rgba(255,71,87,0.9);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition-fast);
}
.btn-remove-img:hover { background: var(--danger); transform: scale(1.1); }

.image-info {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding-bottom: 12px;
}

/* ==============================
   CARD ACTIONS
============================== */
.card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn-preview {
    padding: 11px 20px;
    background: transparent;
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: var(--transition);
}
.btn-preview:hover { background: var(--bg-hover); color: var(--text-primary); }

.primary-btn {
    position: relative;
    padding: 13px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: var(--radius-xl);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    transition: var(--transition);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(109,91,255,0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(109,91,255,0.5);
}

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

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

.btn-ripple {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.primary-btn:hover .btn-ripple { opacity: 1; }

/* ==============================
   RESULT SECTION
============================== */
.result-section {
    padding: 0 28px 28px;
    animation: fadeSlideUp 0.4s ease;
}

.result-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    border: 1px solid var(--border);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.result-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

.result-icon.success { background: rgba(0,229,160,0.15); color: var(--success); }
.result-icon.partial { background: rgba(255,168,37,0.15); color: var(--warning); }
.result-icon.error   { background: rgba(255,71,87,0.15); color: var(--danger); }

.result-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 3px;
}

.result-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.result-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.result-stat {
    flex: 1;
    background: var(--bg-card2);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
    border: 1px solid var(--border);
}

.result-stat-num {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-success { color: var(--success); }
.stat-fail    { color: var(--danger); }

.result-stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

.result-details {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-card2);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.detail-ok   { border-left: 3px solid var(--success); }
.detail-fail { border-left: 3px solid var(--danger); }

.detail-icon { font-size: 14px; }
.detail-id { color: var(--text-muted); flex: 1; font-family: monospace; }
.detail-error { color: var(--danger); font-size: 11px; }

/* ==============================
   TOAST
============================== */
.toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 380px;
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

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

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(120%); }
}

.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-text { font-size: 13px; font-weight: 500; flex: 1; }

.toast-success .toast-icon { color: var(--success); }
.toast-error   .toast-icon { color: var(--danger); }
.toast-info    .toast-icon { color: var(--secondary); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: currentColor;
    opacity: 0.3;
    animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); transform-origin: left; }
}

/* ==============================
   SENDING OVERLAY
============================== */
.sending-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8,12,20,0.85);
    backdrop-filter: blur(10px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sending-modal {
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glow);
    min-width: 300px;
}

.sending-animation {
    position: relative;
    width: 80px; height: 80px;
    margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
}

.pulse-ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: pulseRing 1.5s ease-out infinite;
}

.pulse-ring.delay-1 { animation-delay: 0.5s; }
.pulse-ring.delay-2 { animation-delay: 1s; }

@keyframes pulseRing {
    0%   { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

.sending-icon {
    font-size: 32px;
    color: var(--primary);
    z-index: 1;
    animation: sendFloat 1s ease-in-out infinite alternate;
}

@keyframes sendFloat {
    from { transform: translateX(-3px); }
    to   { transform: translateX(3px); }
}

.sending-modal h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.sending-modal p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.sending-progress {
    height: 4px;
    background: var(--bg-card2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressIndeterminate 1.5s ease-in-out infinite;
}

@keyframes progressIndeterminate {
    0%   { margin-left: 0%; width: 30%; }
    50%  { margin-left: 50%; width: 40%; }
    100% { margin-left: 90%; width: 10%; }
}

/* ==============================
   RESPONSIVE
============================== */
/* ==============================
   MANUAL GROUP ADD BOX
============================== */
.add-group-box {
    margin: 0 8px 10px;
    padding: 12px;
    background: rgba(109,91,255,0.05);
    border: 1px dashed rgba(109,91,255,0.25);
    border-radius: var(--radius-md);
}

.add-group-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-group-label i { color: var(--primary); }

.add-group-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.manual-id-input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Outfit', monospace;
    font-size: 12px;
    padding: 8px 10px;
    outline: none;
    transition: var(--transition-fast);
    min-width: 0;
}

.manual-id-input::placeholder { color: var(--text-muted); font-size: 11px; }
.manual-id-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(109,91,255,0.15);
}

.btn-add-group {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: var(--transition-bounce);
}

.btn-add-group:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(109,91,255,0.4); }

.add-group-hint {
    margin-top: 8px;
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    line-height: 1.5;
}

.add-group-hint a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}
.add-group-hint a:hover { text-decoration: underline; }

/* Remove group button */
.btn-remove-group {
    width: 20px; height: 20px;
    background: rgba(255,71,87,0.15);
    border: none;
    border-radius: 50%;
    color: var(--danger);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
    opacity: 0;
    transition: var(--transition-fast);
}
.group-item:hover .btn-remove-group { opacity: 1; }
.btn-remove-group:hover { background: rgba(255,71,87,0.35); transform: scale(1.1); }

/* ==============================
   MULTI-PHOTO, VIDEO & DOCUMENT PREVIEWS
============================== */
.doc-header-icon {
    background: linear-gradient(135deg, rgba(255,71,87,0.2), rgba(255,107,157,0.08));
    color: #ff5277;
    border: 1px solid rgba(255,71,87,0.25);
}

.doc-drop-icon {
    color: #ff5277 !important;
}

.video-header-icon {
    background: linear-gradient(135deg, rgba(255, 159, 26, 0.22), rgba(255, 82, 82, 0.08));
    color: #ff9f1a;
    border: 1px solid rgba(255, 159, 26, 0.3);
}

.video-drop-icon {
    color: #ff9f1a !important;
}

.media-count-badge.video-badge {
    background: rgba(255, 159, 26, 0.1);
    border-color: rgba(255, 159, 26, 0.3);
    color: #ff9f1a;
}

/* Video Grid & Cards */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 2px;
}

.video-thumb-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #090d16;
    border: 1.5px solid var(--border);
    transition: var(--transition-fast);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumb-card:hover {
    transform: translateY(-2px);
    border-color: #ff9f1a;
    box-shadow: 0 6px 18px rgba(255, 159, 26, 0.25);
}

.video-thumb-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-tag {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    pointer-events: none;
    backdrop-filter: blur(4px);
    transition: var(--transition-fast);
}

.video-thumb-card:hover .video-play-tag {
    background: #ff9f1a;
    border-color: #ff9f1a;
    transform: scale(1.1);
}

.video-thumb-info {
    position: absolute;
    bottom: 5px;
    left: 8px;
    right: 8px;
    font-size: 10.5px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-grid-add {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    border: 2px dashed rgba(255, 159, 26, 0.35);
    background: rgba(255, 159, 26, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 11.5px;
}

.video-grid-add i {
    font-size: 24px;
    color: #ff9f1a;
}

.video-grid-add:hover {
    border-color: #ff9f1a;
    color: #ff9f1a;
    background: rgba(255, 159, 26, 0.12);
    transform: translateY(-2px);
}

.doc-icon-box.video {
    background: rgba(255, 159, 26, 0.15);
    color: #ff9f1a;
    border: 1px solid rgba(255, 159, 26, 0.3);
}

.media-preview-wrapper {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    box-sizing: border-box;
}

.media-preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.media-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius-xl);
    color: var(--secondary);
    font-size: 12px;
    font-weight: 600;
}

.media-count-badge.doc-badge {
    background: rgba(255, 82, 119, 0.1);
    border-color: rgba(255, 82, 119, 0.3);
    color: #ff5277;
}

.btn-clear-media {
    background: rgba(255, 71, 87, 0.12);
    border: 1px solid rgba(255, 71, 87, 0.25);
    border-radius: var(--radius-xl);
    color: #ff6b81;
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-clear-media:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
    transform: translateY(-1px);
}

/* Photo Thumbnail Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding: 2px;
}

.photo-thumb-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card2);
    border: 1.5px solid var(--border);
    transition: var(--transition-fast);
}

.photo-thumb-card:hover {
    transform: translateY(-2px);
    border-color: var(--secondary);
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.25);
}

.photo-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-thumb-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, transparent 40%, rgba(0,0,0,0.7) 100%);
}

.btn-remove-thumb {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.88);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition-fast);
    z-index: 2;
}

.btn-remove-thumb:hover {
    background: var(--danger);
    transform: scale(1.15);
}

.photo-thumb-size {
    position: absolute;
    bottom: 5px;
    left: 6px;
    right: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
}

.photo-grid-add {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-glow);
    background: rgba(109, 91, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 11px;
}

.photo-grid-add i {
    font-size: 20px;
    color: var(--secondary);
}

.photo-grid-add:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

/* Document List */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.doc-item:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 82, 119, 0.35);
}

.doc-icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}

.doc-icon-box.pdf {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.doc-icon-box.word {
    background: rgba(43, 114, 186, 0.15);
    color: #3b88fd;
    border: 1px solid rgba(43, 114, 186, 0.3);
}

.doc-icon-box.excel {
    background: rgba(33, 115, 70, 0.15);
    color: #00d26a;
    border: 1px solid rgba(33, 115, 70, 0.3);
}

.doc-icon-box.archive {
    background: rgba(230, 126, 34, 0.15);
    color: #f39c12;
    border: 1px solid rgba(230, 126, 34, 0.3);
}

.doc-icon-box.file {
    background: rgba(109, 91, 255, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(109, 91, 255, 0.3);
}

.doc-item-details {
    flex: 1;
    min-width: 0;
}

.doc-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.doc-item-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-remove-doc {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.12);
    border: 1px solid rgba(255, 71, 87, 0.2);
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.btn-remove-doc:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
    transform: scale(1.1);
}

.add-more-row {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.btn-add-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: rgba(109, 91, 255, 0.08);
    border: 1px dashed var(--border-glow);
    border-radius: var(--radius-xl);
    color: var(--secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-add-more:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: var(--secondary);
    transform: translateY(-1px);
}
/* ==============================
   SCHOOL NOTICE BAR & TEMPLATES
============================== */
.school-notice-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(255, 159, 26, 0.1), rgba(109, 91, 255, 0.08));
    border: 1px solid rgba(255, 159, 26, 0.28);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.notice-bar-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.notice-bar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #ff9f1a, #ff5252);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 10px rgba(255, 159, 26, 0.35);
}

.notice-bar-desc {
    font-size: 12.5px;
    color: var(--text-primary);
    font-weight: 500;
}

.notice-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-holiday-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: var(--radius-xl);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 14px rgba(109, 91, 255, 0.35);
}

.btn-holiday-open:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 91, 255, 0.5);
}

.badge-new-pulse {
    font-size: 9.5px;
    background: #ff4757;
    color: #fff;
    padding: 2px 7px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.85; }
}

.btn-calendar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius-xl);
    color: var(--secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.btn-calendar-link:hover {
    background: rgba(0, 212, 255, 0.18);
    border-color: var(--secondary);
    transform: translateY(-1px);
}

/* Caption Label Row with Template Button */
.caption-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.caption-label-row .input-label {
    margin-bottom: 0;
}

.btn-caption-template {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 159, 26, 0.1);
    border: 1px solid rgba(255, 159, 26, 0.28);
    border-radius: var(--radius-xl);
    color: #ff9f1a;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-caption-template:hover {
    background: rgba(255, 159, 26, 0.22);
    border-color: #ff9f1a;
    transform: translateY(-1px);
}

/* ==============================
   KHMER HOLIDAY MODAL
============================== */
.holiday-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 22, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

.holiday-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
    width: 100%;
    max-width: 960px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: fadeSlideUp 0.3s ease;
}

.holiday-modal-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff9f1a, #ff4757, var(--primary), var(--secondary));
}

.holiday-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card2);
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 159, 26, 0.2), rgba(255, 71, 87, 0.1));
    border: 1px solid rgba(255, 159, 26, 0.35);
    color: #ff9f1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.modal-title-wrap h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 3px;
}

.modal-title-wrap p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.btn-close-modal {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition-fast);
}

.btn-close-modal:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: rgba(255, 71, 87, 0.4);
    color: #ff4757;
    transform: rotate(90deg);
}

.holiday-modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 24px;
}

/* Left Column Form */
.holiday-form-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label-with-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.form-item-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.link-calendar-external {
    font-size: 11px;
    color: var(--secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.link-calendar-external:hover {
    text-decoration: underline;
}

.holiday-chips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
    max-height: 175px;
    overflow-y: auto;
    padding-right: 4px;
}

.holiday-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 10px;
    background: var(--bg-card2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.holiday-chip:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 159, 26, 0.4);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.holiday-chip.active {
    background: rgba(255, 159, 26, 0.12);
    border-color: #ff9f1a;
    color: var(--text-primary);
    box-shadow: 0 0 0 1px #ff9f1a;
}

.chip-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

.chip-badge.red {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.chip-badge.blue {
    background: rgba(0, 212, 255, 0.15);
    color: var(--secondary);
}

.chip-name {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 650px) {
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.modal-input {
    width: 100%;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    padding: 8px 12px;
    outline: none;
    transition: var(--transition-fast);
}

.modal-input:focus {
    border-color: #ff9f1a;
    box-shadow: 0 0 0 2px rgba(255, 159, 26, 0.2);
}

/* Right Column Preview */
.holiday-preview-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.preview-badge-status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-xl);
    background: rgba(0, 229, 160, 0.15);
    color: #00e5a0;
}

.holiday-preview-bubble {
    background: #17212b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3.5px solid #ff9f1a;
    border-radius: 4px 14px 14px 14px;
    padding: 16px;
    font-size: 13.5px;
    line-height: 1.68;
    color: #ffffff;
    max-height: 380px;
    overflow-y: auto;
    word-break: break-word;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.holiday-preview-bubble b {
    color: #ffcf70;
}

.holiday-preview-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-apply-template {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    background: linear-gradient(135deg, #ff9f1a, #ff5252);
    border: none;
    border-radius: var(--radius-xl);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 14px rgba(255, 159, 26, 0.35);
}

.btn-apply-template:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 159, 26, 0.5);
}

.btn-copy-template {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 16px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

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

/* =====================================================
   AUTO-SCHEDULE HEADER BUTTON & BANNER
===================================================== */
.btn-schedule-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-xl);
    color: #10b981;
    font-family: 'Kantumruy Pro', 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-schedule-header:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.25));
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.schedule-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulseDot 1.8s infinite;
}

.schedule-pulse-dot.mini {
    width: 7px;
    height: 7px;
}

.schedule-pulse-dot.paused {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
    animation: none;
}

@keyframes pulseDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Auto-Schedule Banner */
.schedule-status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 24px 0;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: var(--transition-fast);
}

.schedule-status-banner:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

.schedule-banner-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.schedule-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-full);
    color: #34d399;
    font-size: 12.5px;
    font-weight: 600;
}

.schedule-status-tag.paused {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.live-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    animation: pulseDot 1.8s infinite;
}

.schedule-status-tag.paused .live-pulse-dot {
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
    animation: none;
}

.schedule-next-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.schedule-next-pill i {
    color: #f59e0b;
}

.schedule-next-pill b {
    color: var(--text-primary);
    font-weight: 600;
}

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

.btn-banner-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Kantumruy Pro', 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-banner-action:hover {
    background: var(--bg-hover);
    border-color: var(--secondary);
    color: #fff;
}

.btn-banner-action.test-send {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
    border-color: rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}

.btn-banner-action.test-send:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(168, 85, 247, 0.35));
    border-color: #818cf8;
    color: #fff;
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.3);
}

.btn-schedule-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-xl);
    color: #34d399;
    font-family: 'Kantumruy Pro', 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-schedule-open:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.25));
    border-color: #34d399;
    color: #fff;
}

/* =====================================================
   AUTO-SCHEDULE MODAL STYLES
===================================================== */
.schedule-modal-box {
    max-width: 980px !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.schedule-header-glow {
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, transparent 100%);
}

.modal-header-icon.schedule-icon {
    background: linear-gradient(135deg, #10b981, #06b6d4) !important;
    color: #fff !important;
}

.schedule-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.badge-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-full);
    color: #34d399;
    font-size: 11.5px;
    font-weight: 600;
}

.badge-status-pill.paused {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.schedule-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Individual Schedule Card */
.sched-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* 1. Settings Card */
.sched-card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sched-toggle-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* iOS Switch */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.switch-toggle input:checked + .switch-slider {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    border-color: #10b981;
}

.switch-toggle input:checked + .switch-slider:before {
    transform: translateX(21px);
}

.sched-toggle-labels {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sched-toggle-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.sched-toggle-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.sched-timing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-full);
    color: #34d399;
    font-size: 12.5px;
}

.sched-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.sched-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sched-field.full-width {
    grid-column: 1 / -1;
}

.sched-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sched-targets-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.target-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12.5px;
    color: var(--text-secondary);
}

.target-chip b {
    color: var(--text-primary);
}

.btn-save-sched {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: var(--radius-lg);
    color: #fff;
    font-family: 'Kantumruy Pro', 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-save-sched:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* 2. Hero Next Notice Card */
.sched-card-next {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.12);
}

.next-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-full);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
}

.next-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.next-card-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    min-width: 280px;
}

.next-card-icon {
    font-size: 32px;
    width: 54px;
    height: 54px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.next-card-text h4 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
}

.next-card-dates {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.next-card-dates b {
    color: var(--text-primary);
}

.next-card-trigger {
    font-size: 13px;
    color: #34d399;
}

.next-card-trigger b {
    color: #a7f3d0;
    font-weight: 700;
}

.next-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.countdown-badge {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-lg);
}

.cd-num {
    font-size: 20px;
    font-weight: 800;
    color: #fbbf24;
    font-variant-numeric: tabular-nums;
    font-family: 'Outfit', sans-serif;
}

.cd-lbl {
    font-size: 11px;
    color: var(--text-muted);
    margin-right: 6px;
}

.next-card-actions {
    display: flex;
    gap: 8px;
}

.btn-next-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-lg);
    font-family: 'Kantumruy Pro', 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-next-action.test {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-next-action.test:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

.btn-next-action.preview {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

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

/* 3. Official Holidays List */
.sched-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.list-header-left h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.list-header-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-add-holiday {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-family: 'Kantumruy Pro', 'Outfit', sans-serif;
    font-size: 12.5px;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.sched-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.sched-year-tabs {
    display: flex;
    gap: 6px;
}

.year-tab-btn {
    padding: 6px 14px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.year-tab-btn.active, .year-tab-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.sched-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    min-width: 240px;
}

.sched-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Kantumruy Pro', 'Outfit', sans-serif;
    font-size: 12.5px;
    width: 100%;
}

.sched-holidays-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Individual Holiday Item in List */
.holiday-schedule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
}

.holiday-schedule-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(30, 41, 59, 0.7);
}

.holiday-schedule-item.is-next {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(15, 23, 42, 0.6));
}

.holiday-schedule-item.is-sent {
    opacity: 0.85;
    border-color: rgba(16, 185, 129, 0.3);
}

.sched-item-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.sched-item-badge {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.sched-item-badge.red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.sched-item-badge.blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

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

.sched-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.sched-item-dates {
    font-size: 12px;
    color: var(--text-secondary);
}

.sched-item-trigger {
    font-size: 12px;
    color: #34d399;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sched-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sched-item-status {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.sched-item-status.pending {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.sched-item-status.sent {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.sched-item-status.next {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}

.sched-item-actions {
    display: flex;
    gap: 6px;
}

.btn-item-action {
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.btn-item-action.send-now {
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.btn-item-action.send-now:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

/* 4. Background Server Card */
.sched-card-server {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.server-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.server-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.server-card-header h4 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}

.server-card-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.server-methods-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 14px;
    margin-bottom: 14px;
}

.method-box {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
}

.method-box.highlight {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.06);
}

.method-badge {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 6px;
}

.method-badge.success {
    color: #60a5fa;
}

.method-box h5 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.method-box p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.method-box code {
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    color: #38bdf8;
    font-size: 11.5px;
}

.server-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-server-test {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-family: 'Kantumruy Pro', 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-server-test:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.btn-server-log {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12.5px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.btn-server-log:hover {
    color: var(--text-primary);
    border-color: var(--secondary);
}

/* 5. Logs Table */
.logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.logs-header h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-clear-logs {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-clear-logs:hover {
    color: #ef4444;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.logs-table th {
    text-align: left;
    padding: 8px 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.logs-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.logs-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.custom-holiday-box {
    max-width: 640px !important;
}

.custom-holiday-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
}

@media (max-width: 768px) {
    .schedule-status-banner {
        flex-direction: column;
        align-items: flex-start;
        margin: 12px 16px 0;
    }
    .sched-form-grid, .server-methods-grid {
        grid-template-columns: 1fr;
    }
    .next-card-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .next-card-right {
        align-items: flex-start;
        width: 100%;
    }
    .holiday-schedule-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .sched-item-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 40px rgba(0,0,0,0.5); }
    .main-content { margin-left: 0; }
    .btn-menu-toggle { display: flex; }
    .panel { padding: 16px; }
    .panel-card { padding: 20px; }
    .result-section { padding: 0 16px 16px; }
    .tab-switcher { padding: 16px 16px 0; }
    .result-stats { flex-direction: column; }
}

