:root {
    /* Colors */
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #10B981;
    --secondary-hover: #059669;
    --bg-color: #F3F4F6;
    --card-bg: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --danger-color: #EF4444;
    --danger-hover: #DC2626;
    
    /* Layout */
    --sidebar-width: 260px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 10;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.sidebar-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav li a i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.sidebar-nav li a:hover {
    background-color: #F9FAFB;
    color: var(--primary-color);
}

.sidebar-nav li a.active {
    background-color: #EEF2FF;
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

.sidebar-footer a i {
    margin-right: 12px;
}

.sidebar-footer a:hover {
    color: var(--danger-color);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 9;
}

.topbar-title h1 {
    font-size: 24px;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    gap: 12px;
}

.content-body {
    padding: 32px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* --- Buttons --- */
.btn {
    padding: 10px 18px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background-color: var(--secondary-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: #F9FAFB;
    border-color: #D1D5DB;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-text i {
    margin-right: 6px;
}

.btn-text:hover {
    background-color: #EEF2FF;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover:not(:disabled) {
    color: var(--danger-color);
    background-color: #FEE2E2;
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* --- Form Grid Layout --- */
.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

.form-col-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-col-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --- Form Cards --- */
.form-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.form-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    color: var(--text-main);
    padding-bottom: 12px;
    border-bottom: 1px solid #F3F4F6;
}

.form-card h3 i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* --- Form Controls --- */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group.half {
    flex: 1;
}

.form-group.third {
    flex: 1;
}

label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
    font-size: 13px;
    display: block;
}

.required {
    color: var(--danger-color);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-main);
    background-color: #fff;
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.mb-2 { margin-bottom: 8px; }

/* Adornments */
.input-with-prefix, .input-with-suffix {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: #fff;
}

.input-with-prefix:focus-within, .input-with-suffix:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.prefix, .suffix {
    padding: 0 14px;
    background-color: #F9FAFB;
    color: var(--text-muted);
    font-weight: 500;
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    height: 100%;
    align-self: stretch;
}

.input-with-suffix .suffix {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.input-with-prefix input, .input-with-suffix input {
    border: none;
    border-radius: 0;
}

.input-with-prefix input:focus, .input-with-suffix input:focus {
    box-shadow: none;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
}

.input-with-icon input {
    padding-left: 36px;
}

.input-with-icon .btn-remove {
    margin-left: 8px;
}

/* --- Dynamic Lists --- */
.schedule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    background-color: #F9FAFB;
    padding: 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.schedule-item span {
    font-size: 12px;
    color: var(--text-muted);
}

.objective-item {
    margin-bottom: 10px;
}

.syllabus-item {
    background-color: #F9FAFB;
    padding: 16px;
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
    margin-bottom: 16px;
}

.syllabus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.module-number {
    font-weight: 600;
    font-size: 13px;
    color: var(--primary-color);
    background-color: #EEF2FF;
    padding: 4px 8px;
    border-radius: 4px;
}

/* --- Custom Checkbox --- */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-right: 10px;
    transition: all 0.2s;
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* --- File Upload --- */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px 20px;
    text-align: center;
    background-color: #F9FAFB;
    transition: all 0.2s;
    cursor: pointer;
}

.file-upload-wrapper:hover {
    border-color: var(--primary-color);
    background-color: #EEF2FF;
}

.file-upload-message i {
    font-size: 32px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.file-upload-wrapper:hover .file-upload-message i {
    color: var(--primary-color);
}

.file-upload-message p {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.file-info {
    font-size: 12px;
    color: var(--text-muted);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--text-main);
    color: white;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.toast.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.toast i {
    color: var(--secondary-color);
    margin-right: 12px;
    font-size: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
}
