:root {
    --primary: #4a90e2;
    --bg: #f5f7fa;
    --panel: #ffffff;
    --border: #e1e4e8;
    --text: #333;
    --hover: #f0f2f5;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--panel);
    padding: 0 20px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 10;
}

.status-bar { display: flex; gap: 15px; align-items: center; }
.status { font-size: 14px; color: #666; }
.status.online { color: #2ecc71; }
.status.offline { color: #e74c3c; }
.status.connecting { color: #f39c12; }
.status.error { color: #e74c3c; }

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}
.primary-btn:hover { opacity: 0.9; }

.secondary-btn {
    background: transparent;
    border: 1px dashed #999;
    color: #666;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}
.secondary-btn:hover {
    background: var(--hover);
    border-color: var(--primary);
    color: var(--primary);
}

.container {
    flex: 1;
    display: flex;
    padding: 20px;
    overflow: hidden;
}

.main-panel {
    flex: 1;
    background: var(--panel);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Main Tabs (Top Level) */
.main-tabs {
    display: flex;
    background: #eef1f6;
    border-bottom: 1px solid var(--border);
}
.tab-btn {
    padding: 12px 25px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-right: 1px solid #e1e4e8;
}
.tab-btn.active {
    background: white;
    color: var(--primary);
    font-weight: bold;
    border-bottom: 2px solid var(--primary);
}

.tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Sub Tabs (Weekdays) */
.day-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
    padding: 0 10px;
}
.day-btn {
    padding: 10px 15px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: #666;
}
.day-btn.active {
    color: var(--primary);
    font-weight: bold;
    border-bottom: 2px solid var(--primary);
}

/* Sub Controls (Weekend/SunNight) */
.sub-controls {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: #fafafa;
    border-bottom: 1px solid var(--border);
    gap: 20px;
}
.weekend-sub-btn {
    background: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.weekend-sub-active {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
}

/* Editor */
.schedule-editor {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.slot-row {
    display: flex;
    gap: 10px;
    align-items: center;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
}

/* Inputs */
.cell { display: flex; align-items: center; gap: 5px; }
.col-time { width: 160px; }
.col-type { width: 80px; }
.col-desc { flex: 1; }
.col-course { flex: 1; }
.col-action { width: 30px; }

input, select {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.add-row {
    padding: 10px 20px;
    border-top: 1px solid var(--border);
}


/* Notification Panel */
.notification-panel {
    padding: 30px;
    max-width: 500px;
}

.notification-form {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

.notification-hint {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 6px;
    color: #1565c0;
    font-size: 13px;
}

.notification-hint p {
    margin: 0;
}

#send-noti-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
}
