/* NotUSMI v2 - Modern Clean Theme */

:root {
    /* Colors */
    --primary: #ea580c;
    --primary-dark: #c2410c;
    --primary-light: #f97316;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-dark: #dc2626;

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Background colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    /* Layout */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);

    /* Transitions */
    --transition: all 0.2s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-800);
    background: var(--gray-100);
    height: 100vh;
    overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--gray-900);
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Top Navigation */
.top-nav {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.top-nav .logo {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-nav .logo span {
    color: var(--primary);
}

.top-nav .user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-nav .user-info {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.top-nav .user-info strong {
    color: var(--gray-800);
}

.top-nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Quick Actions Ribbon */
.ribbon {
    background: linear-gradient(180deg, var(--gray-50) 0%, white 100%);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    position: sticky;
    top: 52px;
    z-index: 99;
}

.ribbon-group {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding-right: 1rem;
    border-right: 1px solid var(--gray-200);
}

.ribbon-group:last-child {
    border-right: none;
}

.ribbon-group-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-right: 0.25rem;
}

.ribbon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    min-width: 60px;
    text-decoration: none;
    color: var(--gray-700);
}

.ribbon-btn:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.ribbon-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
}

.ribbon-btn span {
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
}

.ribbon-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.ribbon-btn.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.ribbon-btn.success {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.ribbon-btn.success:hover {
    background: var(--success-dark);
    border-color: var(--success-dark);
    color: white;
}

.ribbon-btn.has-notification {
    animation: pulse-green 1.5s ease-in-out infinite;
    border-color: #22c55e;
}

.ribbon-btn.has-notification svg {
    fill: #22c55e;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
        background: white;
    }
    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
        background: rgba(34, 197, 94, 0.1);
    }
}

/* Service Status Bar */
.status-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.2rem 0.6rem;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 0.7rem;
    border: 1px solid var(--gray-300);
    cursor: default;
}

.status-label {
    color: var(--gray-500);
    font-weight: 500;
}

.status-value {
    color: var(--gray-700);
    font-weight: 600;
}

/* Status States */
.status-item.status-ok {
    background: #d1fae5;
    border-color: var(--success);
}

.status-item.status-ok .status-label {
    color: #047857;
}

.status-item.status-ok .status-value {
    color: var(--success);
}

.status-item.status-ok::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

.status-item.status-warning {
    background: var(--warning);
    border-color: #d97706;
}

.status-item.status-warning .status-label,
.status-item.status-warning .status-value {
    color: white;
}

.status-item.status-warning::before {
    display: none;
}

.status-item.status-error {
    background: var(--danger);
    border-color: #b91c1c;
    animation: pulse-bg 1.5s ease-in-out infinite;
}

.status-item.status-error .status-label,
.status-item.status-error .status-value {
    color: white;
}

.status-item.status-error::before {
    display: none;
}

@keyframes pulse-bg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.status-item.status-unknown {
    opacity: 0.6;
}

.status-item.status-disabled {
    opacity: 0.4;
    border-color: var(--border);
}

.status-item.status-disabled .status-value {
    color: var(--text-muted);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Split View Layout */
.split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    height: calc(100vh - 125px); /* Account for top-nav and ribbon */
    overflow: hidden;
}

.panel {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.panel-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.panel-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.panel-body {
    padding: 1rem;
    flex: 1 1 0;
    overflow-y: auto;
    min-height: 0; /* Important for flex overflow */
}

/* Tab Navigation */
.tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.tab {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
}

.tab:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.tab.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
    padding: 1rem;
    height: 100%;
    overflow-y: auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

.card-title {
    font-weight: 600;
    color: var(--gray-800);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
    color: white;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: white;
    color: var(--gray-800);
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-50);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-gray {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Alerts */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal.modal-lg {
    max-width: 800px;
}

/* Scrollable modal - content scrolls inside */
.modal-scrollable .modal {
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.modal-scrollable .modal-header,
.modal-scrollable .modal-footer {
    flex-shrink: 0;
}

.modal-scrollable .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: calc(95vh - 140px);
}

.table-compact {
    font-size: 0.875rem;
}

.table-compact th,
.table-compact td {
    padding: 0.4rem 0.5rem;
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-weight: 600;
    font-size: 1.125rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Popup Modal List Styling */
#popupAckContent ul,
#popupAckContent ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

#popupAckContent li {
    margin-bottom: 0.25rem;
}

/* Script Content Styling */
.script-content-body {
    padding: 1rem;
    line-height: 1.8;
    text-align: left;
    color: #000;
}

.script-content-body p {
    margin-bottom: 1em;
}

.script-content-body ul,
.script-content-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1em;
}

.script-content-body li {
    margin-bottom: 0.25em;
}

/* Expanded Script Modal */
.expanded-script-modal .modal {
    width: 95vw;
    max-width: none;
    height: 95vh;
    max-height: none;
    display: flex;
    flex-direction: column;
}

.expanded-script-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    font-size: 1.5em;
    line-height: 1.8;
    padding: 2rem;
    color: #000;
}

.expanded-script-modal .modal-body p {
    margin-bottom: 1em;
}

.expanded-script-modal .modal-body ul,
.expanded-script-modal .modal-body ol {
    margin-left: 2rem;
    margin-bottom: 1em;
}

.expanded-script-modal .modal-body li {
    margin-bottom: 0.5em;
}

.expanded-script-modal .modal-header {
    flex-shrink: 0;
}

.expanded-script-modal .modal-footer {
    flex-shrink: 0;
}

/* Talk Ups Grid */
.talkups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.talkups-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.week-display {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
    min-width: 150px;
    text-align: center;
}

.talkups-table {
    font-size: 0.7rem;
    table-layout: fixed;
}

.talkups-table th {
    font-size: 0.7rem;
    padding: 0.25rem;
    text-align: center;
}

.talkups-table th .day-num {
    display: block;
    font-size: 0.65rem;
    color: var(--gray-500);
    font-weight: normal;
}

.talkups-table .slot-header {
    width: 30px;
}

.talkups-table .slot-name {
    width: 30px;
    padding: 0.25rem;
    vertical-align: middle;
    text-align: center;
}

.talkups-table .slot-name span {
    display: block;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-weight: 600;
    font-size: 0.65rem;
    color: var(--gray-600);
    white-space: nowrap;
}

.talkup-cell {
    vertical-align: top;
    padding: 0.25rem !important;
}

.talkup-item {
    position: relative;
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 500;
    border-left: 3px solid;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}

.talkup-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.talkup-item.is-read {
    opacity: 0.5;
    background: var(--gray-200) !important;
    border-left-color: var(--gray-400) !important;
    color: var(--gray-500) !important;
}

.talkup-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mark-read-btn {
    display: none;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.6;
    flex-shrink: 0;
}

.mark-read-btn svg {
    width: 12px;
    height: 12px;
}

.talkup-item:hover .mark-read-btn,
.talkup-item.is-read .mark-read-btn {
    display: block;
}

.mark-read-btn:hover {
    opacity: 1;
}

/* Accordion */
.accordion-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.accordion-header {
    padding: 0.875rem 1rem;
    background: var(--gray-50);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.accordion-header:hover {
    background: var(--gray-100);
}

.accordion-title {
    font-weight: 500;
    color: var(--gray-800);
}

.accordion-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.accordion-body {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    display: none;
}

.accordion-item.open .accordion-body {
    display: block;
}

/* Schedule Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    font-size: 0.75rem;
}

.schedule-day {
    text-align: center;
}

.schedule-day-header {
    font-weight: 600;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.schedule-slot {
    padding: 0.5rem;
    background: var(--primary-light);
    color: white;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.schedule-slot:hover {
    background: var(--primary);
    transform: scale(1.02);
}

.schedule-slot.override {
    background: var(--gray-800);
}

.schedule-slot-time {
    font-weight: 600;
    font-size: 0.6875rem;
}

.schedule-slot-title {
    font-size: 0.625rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Time Slot Management - Week Grid */
.timeslots-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.timeslots-day-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.timeslots-day-header {
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.timeslots-day-slots {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
    min-height: 100px;
}

.timeslot-entry {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.375rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    position: relative;
}

.timeslot-entry .slot-time {
    width: 100%;
    padding: 0.25rem;
    font-size: 0.75rem;
}

.timeslot-entry .slot-name {
    width: 100%;
    padding: 0.25rem;
    font-size: 0.7rem;
}

.timeslot-entry .slot-show {
    width: 100%;
    padding: 0.25rem;
    font-size: 0.7rem;
}

.btn-slot-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    padding: 0;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.timeslot-entry:hover .btn-slot-remove {
    opacity: 1;
}

.btn-add-slot {
    margin-top: 0.5rem;
    padding: 0.25rem;
    font-size: 0.7rem;
    background: transparent;
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-slot:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--gray-50);
}

.timeslots-copy-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

/* Legacy single-day view (keep for compatibility) */
.time-slot-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.time-slot-row .btn-danger {
    padding: 0.25rem 0.5rem;
    min-width: auto;
}

/* Script List */
.script-item {
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.script-item:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.script-item.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

.script-title {
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.script-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Winner Search */
.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-bar .form-input {
    flex: 1;
}

/* Random Generator */
.rng-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rng-result {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.rng-winner {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-small { font-size: 0.75rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.login-header {
    background: var(--primary);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-header h1 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.login-header p {
    opacity: 0.9;
    font-size: 0.875rem;
}

.login-body {
    padding: 2rem;
}

/* Full Width Mode */
.split-view.full-width {
    grid-template-columns: 1fr;
}

.split-view.full-width .panel:last-child {
    display: none;
}

.split-view.full-width .panel:first-child {
    max-width: 100%;
}

/* Expand button */
.expand-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.expand-toggle:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.expand-toggle svg {
    width: 14px;
    height: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .split-view {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        white-space: nowrap;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .schedule-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .rng-inputs {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Email List Styles */
.email-list {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

/* Email Tab Layout - Full Width Split View */
.tab-emails.active {
    position: fixed;
    top: 125px;
    left: 0;
    right: 0;
    height: calc(100vh - 125px);
    z-index: 50;
    background: var(--gray-100);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.email-split-container {
    flex: 1 1 0;
    display: flex;
    gap: 1rem;
    min-height: 0;
    overflow: hidden;
}

.email-list-panel {
    width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 0;
}

.email-detail-panel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

#emailDetailContent {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.email-detail-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-500);
}

.email-detail-content {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    min-height: 0;
    overflow: hidden;
}

.email-detail-content > .flex-between {
    flex-shrink: 0;
}

.email-tab-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.email-list-container {
    flex: 1 1 0;
    overflow-y: auto;
    min-height: 0;
}

.email-item.selected {
    background: #eff6ff;
    border-left: 3px solid var(--primary);
}

.email-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
    background: white;
}

.email-checkbox {
    flex-shrink: 0;
    padding-top: 0.125rem;
}

.email-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.email-content {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.email-select-all {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    font-weight: 500;
}

.email-select-all input[type="checkbox"] {
    cursor: pointer;
}

.email-item:last-child {
    border-bottom: none;
}

.email-item:hover {
    background: var(--gray-50);
}

.email-item.email-unread {
    background: #eff6ff;
    border-left: 3px solid var(--primary);
}

.email-item.email-unread:hover {
    background: #dbeafe;
}

.email-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.email-from {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.email-unread .email-from {
    color: var(--primary-dark);
}

.email-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.email-subject {
    color: var(--gray-600);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-unread .email-subject {
    color: var(--gray-800);
    font-weight: 500;
}

/* Email View Styles */
.email-view .card {
    padding: 0;
}

.email-view-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.email-view-header h4 {
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.email-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
    flex-shrink: 0;
}

.email-meta div {
    margin-bottom: 0.25rem;
}

.email-body {
    padding: 1rem;
    line-height: 1.6;
    flex: 1 1 0;
    overflow-y: auto;
    min-height: 0;
}

.email-body img {
    max-width: 100%;
    height: auto;
}

.email-body table {
    max-width: 100%;
}

.email-body pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    margin: 0;
}

.email-attachments {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.email-attachments ul {
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0;
}

.email-attachments li {
    margin: 0.25rem 0;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.attachment-link:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.attachment-link svg {
    flex-shrink: 0;
}

.audio-player-wrapper {
    margin-top: 0.5rem;
}

.audio-player-wrapper audio {
    width: 100%;
    max-width: 400px;
    height: 40px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c82333;
}

/* WhatsApp Styles */
.whatsapp-toolbar {
    flex: 0 0 auto;
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.whatsapp-search {
    flex: 1;
}

.whatsapp-search input {
    width: 100%;
}

.whatsapp-new-message {
    padding: 1rem;
}

.new-msg-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.new-msg-header h4 {
    margin: 0;
}

.new-msg-form .form-group {
    margin-bottom: 1rem;
}

.new-msg-form .form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.new-msg-form small {
    display: block;
    margin-top: 0.25rem;
}

.whatsapp-conversations {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.whatsapp-conv-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-bottom: 2px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.whatsapp-conv-item:hover {
    background: var(--bg-tertiary);
}

.whatsapp-conv-item.has-unread {
    border-left: 3px solid #25D366;
}

.conv-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

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

.conv-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.conv-name {
    font-weight: 600;
    color: var(--text-primary);
}

.conv-time {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.conv-preview {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-direction {
    color: var(--text-muted);
}

.unread-badge {
    background: #25D366;
    color: white;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* WhatsApp Tab Layout - Full Width Split View */
.tab-whatsapp.active {
    position: fixed;
    top: 125px;
    left: 0;
    right: 0;
    height: calc(100vh - 125px);
    z-index: 50;
    background: var(--gray-100);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.whatsapp-split-container {
    flex: 1 1 0;
    display: flex;
    gap: 1rem;
    min-height: 0;
    overflow: hidden;
}

.whatsapp-list-panel {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 0;
}

.whatsapp-detail-panel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

#whatsappDetailContent {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.whatsapp-detail-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-500);
}

.whatsapp-content {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.whatsapp-list-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.whatsapp-conversations {
    flex: 1 1 0;
    overflow-y: auto;
    min-height: 0;
}

/* WhatsApp Script Marking */
.whatsapp-script-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.whatsapp-script-toolbar .marked-count {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.msg-checkbox {
    position: absolute;
    left: -28px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.chat-message.incoming:hover .msg-checkbox,
.chat-message.incoming.marked .msg-checkbox {
    opacity: 1;
}

.chat-message.marked .message-bubble {
    background: #fef3c7 !important;
    border: 1px solid #f59e0b;
}

.chat-message.incoming.marked .message-bubble {
    background: #fef3c7 !important;
}

/* Chat View */
.whatsapp-chat {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    overflow: hidden;
    min-height: 0;
}

.chat-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.chat-contact {
    flex: 1;
}

.chat-name {
    font-weight: 600;
    display: block;
    color: var(--text-primary);
}

.chat-phone {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
}

.chat-messages {
    flex: 1 1 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    padding-left: 2.5rem;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

.chat-input {
    flex: 0 0 auto;
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border);
}

.chat-message {
    display: flex;
    max-width: 75%;
    position: relative;
}

.chat-message.incoming {
    align-self: flex-start;
    margin-left: 0;
}

.chat-message.outgoing {
    align-self: flex-end;
    margin-right: 0;
}

.message-bubble {
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    max-width: 100%;
}

.chat-message.incoming .message-bubble {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-message.outgoing .message-bubble {
    background: #dcf8c6;
    color: #111;
    border-bottom-right-radius: 4px;
}

.message-text {
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Message reactions */
.message-reactions {
    display: flex;
    gap: 2px;
    margin-top: 4px;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 10px;
    width: fit-content;
}

.reaction-btn {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--gray-300);
    background: white;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
}

.chat-message.incoming:hover .reaction-btn {
    opacity: 1;
}

.reaction-picker {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 4px;
    display: flex;
    gap: 2px;
    box-shadow: var(--shadow-md);
    z-index: 100;
    white-space: nowrap;
}

.reaction-option {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.reaction-option:hover {
    background: var(--gray-100);
}

.chat-image {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 250px;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin-bottom: 0.25rem;
    object-fit: contain;
}

.chat-image:hover {
    opacity: 0.9;
}

.chat-video {
    max-width: 100%;
    width: 100%;
    max-height: 250px;
    border-radius: 8px;
    display: block;
    margin-bottom: 0.25rem;
}

.chat-audio-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    min-width: 200px;
}

.chat-audio-wrapper .audio-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-audio-wrapper .audio-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.chat-audio-wrapper .audio-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chat-audio-wrapper .audio-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat-audio-wrapper .audio-play-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chat-audio-wrapper .audio-play-btn:hover {
    opacity: 0.9;
}

.chat-audio {
    display: none;
}

.image-caption,
.media-caption {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    color: inherit;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

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

.chat-message.outgoing .message-time {
    color: #667;
}

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

.status-icon.read {
    color: #34B7F1;
}

.status-icon.failed {
    color: #dc3545;
}

.new-msg-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 10;
    animation: bounce 1s infinite;
}

.new-msg-indicator:hover {
    background: var(--success-dark);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

.chat-input textarea {
    flex: 1;
    resize: none;
}

.chat-input .btn {
    align-self: flex-end;
}

/* WhatsApp Image Modal */
.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    box-shadow: var(--shadow);
}

.image-modal-close:hover {
    background: white;
}

/* Backup Audio Player */
.ribbon-right {
    margin-left: auto;
}

.backup-track-indicator {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.ribbon-btn.playing {
    background: var(--success);
    color: white;
}

.ribbon-btn.playing:hover {
    background: var(--success-dark);
}

/* Right Panel Content Switching */
.right-content {
    display: none;
    height: 100%;
}

.right-content.active {
    display: block;
}

/* What's On Styles */
.whatson-container {
    padding: 0.5rem;
    height: 100%;
    overflow-y: auto;
}

.whatson-section {
    margin-bottom: 1.5rem;
}

.whatson-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.whatson-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.event-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.event-card.featured {
    border-color: var(--warning);
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.event-card.marked {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.event-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.event-location {
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.event-dates {
    font-weight: 500;
}

.event-times {
    color: var(--text-muted);
}

.event-badges {
    display: flex;
    gap: 0.25rem;
    margin-top: auto;
}

.event-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 10px;
}

.event-badge.free {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.event-badge.paid {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.event-badge.featured {
    background: rgba(234, 88, 12, 0.1);
    color: var(--primary);
}

/* Vouchers Styles */
.vouchers-container {
    padding: 0.5rem;
    height: 100%;
    overflow-y: auto;
}

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

.voucher-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: var(--transition);
}

.voucher-card:hover {
    box-shadow: var(--shadow-sm);
}

.voucher-card.stock-out {
    border-left: 3px solid var(--danger);
    background: linear-gradient(to right, rgba(239, 68, 68, 0.05), transparent);
}

.voucher-card.stock-low {
    border-left: 3px solid var(--warning);
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.voucher-card.stock-medium {
    border-left: 3px solid #3b82f6;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent);
}

.voucher-card.stock-good {
    border-left: 3px solid var(--success);
}

.voucher-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.voucher-stats {
    display: flex;
    gap: 1.5rem;
}

.voucher-stat {
    display: flex;
    flex-direction: column;
}

.voucher-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.voucher-stat-value.stock-out {
    color: var(--danger);
}

.voucher-stat-value.stock-low {
    color: var(--warning);
}

.voucher-stat-value.stock-medium {
    color: #3b82f6;
}

.voucher-stat-value.stock-good {
    color: var(--success);
}

.voucher-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* News List Styles */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.news-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition);
}

.news-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.news-image {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-200);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.news-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title:hover {
    color: var(--primary);
}

.news-excerpt {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: auto;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.625rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table code {
    background: var(--gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--gray-700);
}
