/* File: assets/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
}

/* Login Page */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a472a, #2d7d46);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.login-header h2 {
    color: #1a472a;
    font-weight: 700;
    margin-bottom: 5px;
}

.login-header h4 {
    color: #666;
    font-size: 16px;
}

/* Main Header */
.main-header {
    background: #1a472a;
    color: white;
    padding: 12px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.header-title h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.header-title small {
    font-size: 12px;
    opacity: 0.8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-date {
    font-size: 14px;
}

.header-user {
    cursor: pointer;
}

.header-user button {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: #2c3e50;
    overflow-y: auto;
    padding-top: 20px;
    transition: all 0.3s;
    z-index: 999;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #a8b2c1;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active > a {
    background: #34495e;
    color: white;
}

.sidebar-menu li a i {
    width: 20px;
    margin-right: 10px;
}

.sidebar-menu li a .arrow {
    margin-left: auto;
    transition: transform 0.3s;
}

.sidebar-menu li a .arrow.collapsed {
    transform: rotate(-90deg);
}

.sidebar-menu .menu-title {
    padding: 10px 20px;
    color: #6c7a8a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu ul ul {
    padding-left: 40px;
}

.sidebar-menu ul ul li a {
    padding: 8px 20px;
    font-size: 14px;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    margin-top: 64px;
    padding: 20px;
    min-height: calc(100vh - 64px);
}

/* Stats Cards */
.stats-cards {
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #1a472a;
}

.stat-info h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.stat-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Unit Balance List */
.unit-balance-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.unit-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.unit-item .balance {
    font-weight: 600;
}

.unit-item .balance.positive {
    color: #28a745;
}

.unit-item .balance.negative {
    color: #dc3545;
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a472a;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    
    .sidebar.active {
        width: 260px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-date {
        display: none;
    }
}

/* Alert */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #1a472a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 71, 42, 0.1);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: #1a472a;
    color: white;
}

.btn-primary:hover {
    background: #0d3620;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}