/* Fin-Tren - Modern & Elegant CSS */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-muted: #6b7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
}

/* ========== LOGIN PAGE ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 20px;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    padding: 10px;
}

.login-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.login-header h2 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-form .form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.login-form .form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.password-input-wrapper {
    position: relative;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.btn-toggle-password:hover {
    color: var(--primary-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
}

/* ========== DASHBOARD LAYOUT ========== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    box-shadow: var(--shadow-md);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header .logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    max-width: 100%;
    max-height: 100%;
}

.sidebar-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
}

.sidebar-header p {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.9;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu .nav-link {
    padding: 0.875rem 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-weight: 500;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar-menu .nav-link i {
    font-size: 1.25rem;
    width: 24px;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    transition: var(--transition);
    padding-left: 1.5rem;
}

.topbar {
    background: white;
    padding: 1rem 2rem;
    padding-left: 0;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--light-color);
    border-radius: 8px;
}

.content-area {
    padding: 2rem 2rem 2rem 0;
    max-width: 100%;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

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

.table thead th {
    background: var(--light-color);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

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

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    transition: var(--transition);
}

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

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .btn-sidebar-toggle {
        display: block;
    }
    
    .topbar {
        padding: 1rem;
        margin-left: 0;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .table-responsive {
        font-size: 0.75rem;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* File Upload */
.form-control[type="file"] {
    padding: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Stat Cards */
.stat-card {
    transition: var(--transition);
    height: 100%;
}

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

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.2;
}

.stat-card h6 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

@media (max-width: 576px) {
    .stat-card h3 {
        font-size: 1.25rem;
    }
    
    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .stat-card h6 {
        font-size: 0.7rem;
    }
}

/* Content Wrapper */
.content-wrapper {
    padding: 2rem 2rem 2rem 0;
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem;
    }
}

/* User Info in Topbar */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--light-color);
    border-radius: 8px;
}

.user-info i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.user-info .user-name {
    font-weight: 600;
    color: var(--text-color);
    display: block;
    line-height: 1.2;
}

.user-info .user-role {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: block;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .user-info {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
        text-align: center;
    }
    
    .user-info .user-name,
    .user-info .user-role {
        font-size: 0.75rem;
    }
}

/* Table Responsive Improvements */
@media (max-width: 768px) {
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.5rem;
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .table tbody td:last-child {
        border-bottom: none;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        margin-right: 1rem;
    }
}

/* Card Header Responsive */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .card-header form {
        width: 100%;
    }
    
    .card-header form .form-control {
        width: 100% !important;
    }
}


