* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --bg: #f8fafc;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: var(--white);
    border-right: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.logo {
    padding: 24px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 20px;
    box-shadow: var(--shadow-lg);
}

.logo h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.search-box {
    padding: 16px 24px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--bg);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray);
    pointer-events: none;
}

.nav-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.nav-menu::-webkit-scrollbar {
    width: 6px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 3px;
}

.nav-category {
    margin-bottom: 8px;
}

.category-header {
    padding: 12px 24px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.category-header svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.category-header.collapsed svg {
    transform: rotate(-90deg);
}

.category-items {
    display: block;
}

.category-items.hidden {
    display: none;
}

.nav-item {
    display: block;
    padding: 12px 24px 12px 40px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg);
    color: var(--primary);
    border-left-color: var(--primary-light);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    gap: 8px;
}

.admin-btn, .logout-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.admin-btn {
    background: var(--primary);
    color: var(--white);
}

.admin-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.admin-btn svg {
    width: 16px;
    height: 16px;
}

.logout-btn {
    background: var(--bg);
    color: var(--gray);
    border: 1px solid var(--gray-light);
}

.logout-btn:hover {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    padding: 24px 32px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.content-body {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.content-body::-webkit-scrollbar {
    width: 8px;
}

.content-body::-webkit-scrollbar-track {
    background: transparent;
}

.content-body::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 4px;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--gray);
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.welcome-icon svg {
    width: 40px;
    height: 40px;
    color: var(--white);
    stroke-width: 2;
}

.welcome-screen h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.welcome-screen p {
    font-size: 16px;
    max-width: 400px;
}

/* Script Content */
.script-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.script-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.script-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

.script-item {
    background: var(--bg);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

.script-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.script-item:last-child {
    margin-bottom: 0;
}

.script-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.script-text {
    color: var(--dark);
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.script-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-copy {
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-copy svg {
    width: 14px;
    height: 14px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--success);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Alert Toast */
.alert-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--white);
    color: var(--dark);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 400px;
    border: 2px solid var(--warning);
}

.alert-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.alert-toast-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.alert-toast-header svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
    color: var(--warning);
    flex-shrink: 0;
}

.alert-toast-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.alert-toast p {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    color: var(--dark);
}

.btn-ok {
    background: var(--warning);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-ok:hover {
    background: #d97706;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        position: fixed;
        left: -280px;
        transition: left 0.3s ease;
        height: 100vh;
    }

    .sidebar.open {
        left: 0;
    }

    .content-body {
        padding: 16px;
    }

    .content-header {
        padding: 16px;
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray);
}

.no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 8px;
}

/* Checklist Styles */
.checklist {
    background: var(--bg);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-top: 16px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-light);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.checklist-icon.check {
    color: var(--success);
}

.checklist-icon.alert {
    color: var(--warning);
}