@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-green: #1b5e20;
    --secondary-green: #2e7d32;
    --light-green: #4caf50;
    --dark-green: #103b13;
    --sidebar-bg: #1b5e20;
    --sidebar-hover: #2e7d32;
    --text-light: #f1f8e9;
    --text-dark: #263238;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.sidebar-header {
    padding: 0 25px 30px;
    text-align: center;
}

.sidebar-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--white);
    margin-bottom: 5px;
}

.sidebar-menu {
    flex: 1;
    list-style: none;
}

.sidebar-menu li {
    margin: 4px 15px;
}

.sidebar-menu a {
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.sidebar-menu a i {
    margin-right: 12px;
    font-size: 1.1rem;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: var(--sidebar-hover);
    color: var(--white);
    transform: translateX(5px);
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    height: 70px;
    background: var(--white);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-green);
}

/* Dashboard Cards */
.content-wrapper {
    padding: 30px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
}

.card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 10px 0;
}

/* Table Styling */
.table-container {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 15px;
    background: #f8f9fa;
    color: #444;
    font-weight: 600;
    border-bottom: 2px solid #eee;
}

td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

tr:hover {
    background: #fcfcfc;
}

.schedule-panel {
    background: var(--white);
    padding: 18px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.schedule-panel-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.schedule-panel-header h3 {
    margin-bottom: 4px;
    color: var(--primary-green);
    font-size: 1.1rem;
}

.schedule-subtitle {
    color: #5c6b64;
    margin-top: 0;
    line-height: 1.4;
    font-size: 0.78rem;
}

.schedule-grid-wrapper {
    overflow-x: auto;
}

.schedule-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: 0;
}

.schedule-grid th,
.schedule-grid td {
    border: 1px solid #e6e8eb;
    padding: 8px 6px;
    vertical-align: middle;
    word-break: break-word;
}

.schedule-grid th {
    background: #f7faf7;
    color: #2f4f3a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 0.72rem;
    text-align: center;
}

.schedule-time-column {
    width: 70px;
    font-weight: 700;
    color: #444;
    background: #fcfdfb;
    text-align: center;
}

.schedule-cell {
    border-radius: 10px;
    color: #1f2f23;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
    line-height: 1.25;
    padding: 6px 5px;
}

.schedule-cell-title {
    font-weight: 700;
    margin-bottom: 3px;
    font-size: 0.8rem;
}

.schedule-cell-copy {
    font-size: 0.72rem;
    color: #3c4a3e;
    margin-bottom: 3px;
}

.schedule-empty {
    background: #fbfcfb;
}

.empty-schedule-note {
    padding: 28px;
    border: 1px dashed #cfd8dc;
    border-radius: 14px;
    color: #546e7a;
    font-weight: 600;
    background: #f8fafc;
}

@media (max-width: 1200px) {
    .schedule-grid {
        min-width: 0;
    }
    .schedule-grid th,
    .schedule-grid td {
        padding: 6px 4px;
    }
    .schedule-cell {
        padding: 5px 4px;
    }
    .schedule-cell-title {
        font-size: 0.75rem;
    }
    .schedule-cell-copy {
        font-size: 0.68rem;
    }
    .schedule-legend-item {
        padding: 8px 10px;
    }
}

@media (max-width: 900px) {
    .schedule-panel {
        padding: 14px;
    }
    .schedule-grid {
        min-width: 0;
    }
    .schedule-grid th,
    .schedule-grid td {
        font-size: 0.68rem;
    }
    .schedule-time-column {
        width: 60px;
    }
    .schedule-legend {
        display: none;
    }
    .schedule-panel-header {
        gap: 8px;
    }
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--secondary-green);
}

/* Login Page Styling */
.login-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.login-box h2 {
    text-align: center;
    color: var(--primary-green);
    margin-bottom: 30px;
    font-size: 2rem;
}

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

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .sidebar-header h3, .sidebar-menu span {
        display: none;
    }
    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
    }
}
