/* Campus Cashless - Main Stylesheet */

:root {
    --primary: #1A1A47;
    --secondary: #6CA2D5;
    --accent: #5C748C;
    --dark: #344F5B;
    --light: #DEE3E4;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #6CA2D5;
    --text: #1A1A47;
    --text-muted: #5C748C;
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 20px;
}

.auth-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 15px;
}

.auth-logo h1 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 5px;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--light);
    font-size: 14px;
}

.auth-footer a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
}

.forgot-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.user-profile {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 10px;
}

.user-name {
    font-weight: 600;
    font-size: 16px;
}

.user-role {
    font-size: 12px;
    opacity: 0.7;
    text-transform: capitalize;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left-color: var(--secondary);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.logout-btn {
    margin: 20px;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    font-size: 14px;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2);
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 30px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--secondary);
}

.stat-card.blue {
    border-left-color: var(--secondary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

/* Content Cards */
.content-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.balance-info h3 {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.balance-amount {
    font-size: 36px;
    font-weight: 700;
}

.balance-actions {
    display: flex;
    gap: 12px;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.quick-action-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--secondary);
    transition: transform 0.2s;
    cursor: pointer;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.quick-action-card h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.quick-action-card .amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
}

select.form-control {
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: #2a2a5c;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--light);
    color: var(--text);
}

.btn-secondary:hover {
    background: #c8d0d2;
}

.btn-cashin {
    background: var(--success);
    color: white;
}

.btn-pay {
    background: var(--secondary);
    color: white;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--light);
    font-weight: 600;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--light);
    font-size: 14px;
}

.data-table tr:hover {
    background: rgba(108, 162, 213, 0.05);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-active, .status-completed, .status-approved {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.status-pending {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.status-inactive, .status-rejected, .status-failed, .status-suspended {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* Type Badges */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.type-cash-in {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.type-payment {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.type-cash-out {
    background: rgba(108, 162, 213, 0.1);
    color: var(--info);
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 12px;
}

.action-btn.edit {
    background: rgba(108, 162, 213, 0.1);
    color: var(--secondary);
}

.action-btn.view {
    background: rgba(26, 26, 71, 0.1);
    color: var(--primary);
}

.action-btn.delete {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.action-btn:hover {
    transform: scale(1.1);
}

/* Search & Filter */
.search-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary);
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--secondary);
}

/* Balance Badge */
.balance-badge {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--light);
}

.modal-content form {
    padding: 24px;
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Error Messages */
.error-msg {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

/* Toast */
.toast {
    padding: 14px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.warning {
    background: var(--warning);
    color: #333;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state h3 {
    margin: 15px 0 5px;
    color: var(--text);
}

.empty-state p {
    font-size: 14px;
}

/* Password Requirements */
.password-requirements {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

.password-requirements p {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.password-requirements ul {
    list-style: none;
    padding: 0;
}

.password-requirements li {
    padding: 4px 0;
    color: var(--text-muted);
    transition: color 0.3s;
}

.password-requirements li i {
    font-size: 8px;
    margin-right: 8px;
    vertical-align: middle;
}

.password-requirements li.valid {
    color: var(--success);
}

.password-requirements li.valid i {
    color: var(--success);
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Print Styles */
@media print {
    .sidebar, .logout-btn, .btn, .action-btns, .search-filter-bar {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .main-content {
        margin-left: 0;
    }
    .dashboard-wrapper {
        flex-direction: column;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .charts-row {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .balance-card {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}