/* assets/style.css */
:root {
  --primary-red: #c0392b;
  --dark-red: #962d22;
  --light-red: #f9ebea;
  --white: #ffffff;
  --gray-bg: #f4f6f9;
  --text-dark: #2c3e50;
  --border-color: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--gray-bg); color: var(--text-dark); display: flex; flex-direction: column; min-height: 100vh; }

/* Top Header Bar */
.header-bar { background: var(--primary-red); color: var(--white); display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.header-logo-container { display: flex; align-items: center; gap: 15px; }
.header-logo { width: 50px; height: 50px; border-radius: 50%; background: #fff; padding: 3px; }
.header-title h1 { font-size: 1.2rem; margin: 0; }
.header-title p { font-size: 0.85rem; opacity: 0.9; }

/* Main Container & Sidebar */
.app-container { display: flex; flex: 1; }
.sidebar { width: 260px; background: #fff; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; }
.sidebar-header { padding: 15px; background: var(--light-red); border-bottom: 1px solid var(--border-color); font-weight: bold; color: var(--dark-red); }
.sidebar-menu { list-style: none; padding: 10px 0; }
.sidebar-menu li a { display: block; padding: 12px 20px; color: var(--text-dark); text-decoration: none; font-weight: 500; border-left: 4px solid transparent; transition: all 0.2s; }
.sidebar-menu li a:hover, .sidebar-menu li a.active { background: var(--light-red); color: var(--primary-red); border-left-color: var(--primary-red); }

/* Main Content Area */
.main-content { flex: 1; padding: 25px; overflow-y: auto; }
.page-title { margin-bottom: 20px; font-size: 1.5rem; color: var(--dark-red); border-bottom: 2px solid var(--primary-red); padding-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }

/* Cards & Grid Layouts */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; border-top: 4px solid var(--primary-red); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.stat-card h3 { font-size: 0.9rem; color: #7f8c8d; text-transform: uppercase; }
.stat-card .value { font-size: 1.6rem; font-weight: bold; color: var(--primary-red); margin-top: 8px; }

/* Forms & Tables */
.form-container { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 25px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.9rem; font-weight: 600; color: var(--text-dark); }
.form-group input, .form-group select, .form-group textarea { padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.95rem; }
.form-group input[readonly] { background-color: #e9ecef; }

.btn { display: inline-block; padding: 10px 18px; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; text-decoration: none; text-align: center; }
.btn-primary { background: var(--primary-red); color: #fff; }
.btn-primary:hover { background: var(--dark-red); }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-success { background: #2ecc71; color: #fff; }

.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.data-table th, .data-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }
.data-table th { background: var(--light-red); color: var(--dark-red); font-weight: bold; }
.data-table tr:hover { background: #fdf2f2; }

/* Password Eye Toggle */
.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { width: 100%; padding-right: 40px; }
.toggle-eye { position: absolute; right: 10px; cursor: pointer; user-select: none; font-size: 1.1rem; }

/* Filter Bar */
.filter-bar { display: flex; gap: 15px; align-items: flex-end; background: #fff; padding: 15px; border-radius: 8px; margin-bottom: 20px; flex-wrap: wrap; }

/* Printable View Rules */
@media print {
  .sidebar, .header-bar, .btn, .filter-bar, .no-print { display: none !important; }
  .main-content { padding: 0; margin: 0; width: 100%; }
  .printable-header { display: flex !important; align-items: center; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 20px; }
  .data-table { border: 1px solid #000; }
  .data-table th, .data-table td { border: 1px solid #000; }
}

.printable-header { display: none; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-container { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
}