Newer
Older
teacher-diary / src / main / resources / static / css / style.css
/* =====================================================
   Main Layout Styles - Teacher Diary
   ===================================================== */

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    --header-height: 60px;
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --sidebar-bg: #1e1e2d;
    --sidebar-text: #9899ac;
    --sidebar-active: #ffffff;
    --body-bg: #f5f7fa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header i {
    font-size: 28px;
    color: var(--primary-color);
}

.sidebar-header span {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.sidebar-nav a.active {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    border-left: 3px solid var(--primary-color);
}

.sidebar-nav a i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar i {
    font-size: 32px;
    color: var(--sidebar-text);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.user-role {
    font-size: 12px;
    color: var(--sidebar-text);
}

.logout-btn {
    color: var(--sidebar-text);
    font-size: 20px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #ff6b6b;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

.main-header {
    height: var(--header-height);
    background: white;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.content {
    padding: 24px;
}

/* Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-card .stat-icon.primary { background: rgba(102, 126, 234, 0.1); color: var(--primary-color); }
.stat-card .stat-icon.success { background: rgba(40, 167, 69, 0.1); color: #28a745; }
.stat-card .stat-icon.warning { background: rgba(255, 193, 7, 0.1); color: #ffc107; }
.stat-card .stat-icon.info { background: rgba(23, 162, 184, 0.1); color: #17a2b8; }

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #6c757d;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed);
        overflow: hidden;
    }

    .sidebar.collapsed {
        width: var(--sidebar-width);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.card-header {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 16px 20px;
}

.card-body {
    padding: 20px;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: #6c757d;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: none;
    padding: 12px 16px;
    background: #f8f9fa;
}

.table td {
    padding: 14px 16px;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: #f8f9fa;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
}

/* Form */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Badge */
.badge {
    font-weight: 500;
    padding: 6px 10px;
}