/* RD Loan Admin - Clean Modern Theme */
:root {
    --sidebar-width: 260px;
    --primary: #0d6efd;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --topbar-height: 60px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f1f5f9;
    margin: 0;
    min-height: 100vh;
}

/* ========== Login Page ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.login-card .logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-card .logo h3 {
    color: #1e293b;
    font-weight: 700;
    margin: 0;
}

.login-card .logo small {
    color: #64748b;
}

/* ========== Sidebar ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: #e2e8f0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s;
}

.sidebar-brand {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand h5 {
    margin: 0;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
}

.sidebar-brand small {
    color: #94a3b8;
    font-size: 0.7rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.sidebar-menu .menu-label {
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-top: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-menu .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #0f172a;
}

.sidebar-menu .submenu a {
    padding-left: 3rem;
    font-size: 0.85rem;
}

/* ========== Main Content ========== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar .page-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1e293b;
    margin: 0;
}

.content-area {
    padding: 1.5rem;
}

/* ========== Cards ========== */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

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

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.stat-card.clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Alert Cards Colors */
.bg-overdue { background: #fef2f2; }
.bg-overdue .stat-icon { background: #fee2e2; color: #dc2626; }
.bg-today { background: #fff7ed; }
.bg-today .stat-icon { background: #ffedd5; color: #ea580c; }
.bg-upcoming { background: #eff6ff; }
.bg-upcoming .stat-icon { background: #dbeafe; color: #2563eb; }
.bg-success-soft { background: #f0fdf4; }
.bg-success-soft .stat-icon { background: #dcfce7; color: #16a34a; }

/* ========== Tables ========== */
.card-table {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.card-table .card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.table {
    margin: 0;
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.badge-status {
    font-size: 0.75rem;
    padding: 0.3em 0.6em;
    border-radius: 6px;
    font-weight: 500;
}

/* ========== Forms ========== */
.form-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1.5rem;
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
}

/* ========== Responsive ========== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
}

/* User dropdown */
.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1e293b;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}
/* ========== Print ========== */
@media print {
  .sidebar,
  .topbar,
  .btn,
  .form-card,
  .no-print,
  #sidebarToggle,
  .modal,
  .dropdown {
    display: none !important;
  }
  .main-content,
  .content-wrapper,
  body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    background: #fff !important;
  }
  .card-table,
  .stat-card,
  .alert {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  .print-only {
    display: block !important;
  }
  a[href]::after {
    content: none !important;
  }
  table {
    font-size: 11px !important;
  }
  .badge {
    border: 1px solid #333;
    color: #000 !important;
    background: #eee !important;
  }
}
.print-only { display: none; }
.print-header {
  text-align: center;
  margin-bottom: 12px;
  border-bottom: 2px solid #333;
  padding-bottom: 8px;
}
