/* assets/css/erp-style.css */
/* Modern College ERP Design System */

:root {
    --primary: #1e3a8a;          /* Deep Navy */
    --primary-light: #2563eb;    /* Royal Blue */
    --primary-dark: #0f172a;     /* Dark Slate Navy */
    --primary-bg: #eff6ff;       /* Soft Blue Tint */
    --accent: #0284c7;           /* Sky Blue Accent */
    --surface: #ffffff;
    --background: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --sidebar-width: 260px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px;
    min-height: 100vh;
}

/* ERP Layout Structure */
.erp-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.erp-sidebar {
    width: var(--sidebar-width);
    background: #0f172a;
    color: #f8fafc;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    border-right: 1px solid #1e293b;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #1e293b;
    background: #0b1120;
}

.sidebar-header .erp-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.sidebar-header .erp-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: #ffffff;
    line-height: 1.2;
}

.sidebar-header .erp-subtitle {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    padding: 8px 12px 6px;
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 13.5px;
    margin-bottom: 3px;
    transition: all 0.15s ease;
}

.nav-link:hover {
    color: #ffffff;
    background: #1e293b;
}

.nav-link.active {
    color: #ffffff;
    background: #1e3a8a;
    font-weight: 600;
}

.nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #1e293b;
    background: #0b1120;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 11px;
    color: #94a3b8;
}

/* Main Content Area */
.erp-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.erp-topbar {
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.erp-body {
    padding: 28px;
    flex: 1;
}

/* Cards */
.erp-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

/* Metric / Stat Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.metric-icon.blue { background: #dbeafe; color: #1e40af; }
.metric-icon.green { background: #d1fae5; color: #065f46; }
.metric-icon.amber { background: #fef3c7; color: #92400e; }
.metric-icon.purple { background: #ede9fe; color: #5b21b6; }

.metric-content .metric-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.metric-content .metric-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Clean Tables */
.erp-table-responsive {
    overflow-x: auto;
}

.erp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}

.erp-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.erp-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    color: #1e293b;
    vertical-align: middle;
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 600;
}

.badge-branch {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-neutral { background: #f1f5f9; color: #475569; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-lg {
    padding: 11px 22px;
    font-size: 14.5px;
}

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

.btn-primary:hover {
    background: #1e40af;
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: #334155;
    border: 1px solid var(--border);
}

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

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline-danger {
    background: transparent;
    border-color: #fca5a5;
    color: #dc2626;
}

.btn-outline-danger:hover {
    background: #fee2e2;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.form-control, .form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--text-main);
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Search and Filters Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    background: #ffffff;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.filter-bar .search-input-group {
    flex: 1;
    min-width: 240px;
    position: relative;
}

.search-input-group input {
    padding-left: 36px;
}

.search-input-group .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* Alerts */
.erp-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: var(--danger-bg); color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: var(--primary-bg); color: #1e40af; border: 1px solid #bfdbfe; }

/* Upload Box */
.upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 36px 20px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--primary);
    background: #eff6ff;
}

.upload-icon {
    font-size: 42px;
    color: #3b82f6;
    margin-bottom: 12px;
}

/* Pagination */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.pagination {
    display: flex;
    gap: 4px;
    list-style: none;
}

.pagination a, .pagination span {
    padding: 5px 11px;
    border-radius: 4px;
    border: 1px solid var(--border);
    color: #334155;
    text-decoration: none;
    font-weight: 500;
}

.pagination .active a, .pagination .active span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-backdrop.show {
    display: flex;
}

.modal-dialog {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 95%;
    max-width: 520px;
    overflow: hidden;
    animation: modalIn 0.18s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    padding: 14px 22px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .erp-sidebar {
        transform: translateX(-100%);
    }
    .erp-sidebar.open {
        transform: translateX(0);
    }
    .erp-main {
        margin-left: 0;
    }
}
