:root {
    --bg-dark: #090d16;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(31, 41, 61, 0.85);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-focus: rgba(66, 133, 244, 0.5);
    
    --primary: #ea4335;
    --primary-glow: rgba(234, 67, 53, 0.35);
    --primary-hover: #d93025;
    
    --blue: #4285f4;
    --blue-glow: rgba(66, 133, 244, 0.35);
    
    --green: #34a853;
    --green-glow: rgba(52, 168, 83, 0.35);
    
    --amber: #fbbc05;
    --amber-glow: rgba(251, 188, 5, 0.35);

    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-sub: #6b7280;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Glowing Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    animation: floatBlob 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, var(--blue) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-duration: 25s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--green) 0%, transparent 70%);
    top: 40%;
    left: 45%;
    opacity: 0.12;
    animation-duration: 18s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 60px) scale(1.1); }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
.glass-header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(234, 67, 53, 0.2), rgba(66, 133, 244, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.logo h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
}

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

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.online {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
}

.status-badge.active {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

.status-badge.inactive {
    color: #9ca3af;
    border-color: rgba(156, 163, 175, 0.2);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 10px currentColor;
    animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-glass);
}

.panel-title h2 {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title h2 i {
    color: var(--blue);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-icon.red { background: rgba(234, 67, 53, 0.15); color: #ea4335; }
.stat-icon.blue { background: rgba(66, 133, 244, 0.15); color: #4285f4; }
.stat-icon.green { background: rgba(52, 168, 83, 0.15); color: #34a853; }
.stat-icon.amber { background: rgba(251, 188, 5, 0.15); color: #fbbc05; }

.stat-info h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.stat-info p {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-decoration: none;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ea4335, #d93025);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f05244, #ea4335);
    box-shadow: 0 6px 20px rgba(234, 67, 53, 0.5);
    transform: translateY(-1px);
}

.btn-blue {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    color: #fff;
    box-shadow: 0 4px 15px var(--blue-glow);
}

.btn-blue:hover {
    background: linear-gradient(135deg, #5b95f7, #4285f4);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.5);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #34a853, #1e8e3e);
    color: #fff;
    box-shadow: 0 4px 15px var(--green-glow);
}

.btn-success:hover {
    background: linear-gradient(135deg, #46b864, #34a853);
    box-shadow: 0 6px 20px rgba(52, 168, 83, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

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

/* Form Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.input-glass {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition);
}

.input-glass:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
    background: rgba(0, 0, 0, 0.35);
}

.input-glass option {
    background: #111827;
    color: #fff;
}

/* Schedule Switcher Type Cards */
.schedule-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 1.5rem;
}

.schedule-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.schedule-option i {
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: var(--text-muted);
    display: block;
    transition: var(--transition);
}

.schedule-option span {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.schedule-option:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
}

.schedule-option.active {
    background: rgba(66, 133, 244, 0.15);
    border-color: var(--blue);
    box-shadow: 0 0 15px rgba(66, 133, 244, 0.25);
}

.schedule-option.active i,
.schedule-option.active span {
    color: var(--blue);
}

/* Weekday Pills */
.weekday-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.weekday-pill {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.weekday-pill:hover {
    background: rgba(255, 255, 255, 0.08);
}

.weekday-pill.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.4);
}

/* Glass Table */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.glass-table th {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-glass);
}

.glass-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-main);
}

.glass-table tr:last-child td {
    border-bottom: none;
}

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

.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-family: monospace;
    background: rgba(66, 133, 244, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(66, 133, 244, 0.25);
}

/* Tags Input Container */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    min-height: 48px;
    align-items: center;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(234, 67, 53, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(234, 67, 53, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
}

.tag-item i {
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.7;
    transition: var(--transition);
}

.tag-item i:hover {
    opacity: 1;
    color: #fff;
}

.tag-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.88rem;
    padding: 4px;
    min-width: 140px;
}

/* Terminal Log Box */
.terminal-box {
    background: #060910;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-content {
    padding: 14px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    height: 280px;
    overflow-y: auto;
    color: #d1d5db;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Log Coloring */
.log-info { color: #93c5fd; }
.log-warn { color: #fde047; }
.log-error { color: #fca5a5; font-weight: bold; }
.log-success { color: #86efac; }

/* Alerts / Notifications */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

.alert-success {
    background: rgba(52, 168, 83, 0.15);
    border: 1px solid rgba(52, 168, 83, 0.3);
    color: #86efac;
}

.alert-error {
    background: rgba(234, 67, 53, 0.15);
    border: 1px solid rgba(234, 67, 53, 0.3);
    color: #fca5a5;
}

.hidden {
    display: none !important;
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: #111827;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 1.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

.modal-header h3 {
    font-size: 1.1rem;
    color: #fff;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: #fff;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 1.5rem;
}
