/* ============================================
   DIGITAL DETOX - COMPLETE STYLESHEET
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #2c3e50;
    --light-color: #f5f7fa;
    --border-color: #e0e0e0;
    --text-color: #333;
    --text-muted: #666;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--light-color);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-navbar {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    margin: 0;
}

.navbar-brand a {
    color: var(--white);
    text-decoration: none;
}

.admin-badge {
    font-size: 0.7rem;
    background: rgba(255,255,255,0.3);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 10px;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
}

.navbar-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: rgba(255,255,255,0.2);
}

.btn-logout {
    background: rgba(255,255,255,0.2) !important;
    border: 1px solid rgba(255,255,255,0.3);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: 0.3s;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: var(--white);
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn-disabled,
.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small,
.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
}

.input-disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

/* Login Page */
.login-page {
    display: flex;
    flex-direction: column;           /* stack items vertically */
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box,
.register-box {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.register-box {
    max-width: 500px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    animation: slideIn 0.3s;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--info-color);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.page-header h2 {
    margin: 0;
    color: var(--dark-color);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stats-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    margin: 0;
    color: var(--primary-color);
}

.stat-content p {
    margin: 5px 0 0 0;
    color: var(--text-muted);
}

.stat-content small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Program Cards */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.program-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 30px rgba(0,0,0,0.15);
}

.program-card.ineligible {
    opacity: 0.6;
}

.program-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.program-card h3,
.program-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.program-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.program-stats,
.program-info {
    margin: 15px 0;
}

.stat-item,
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child,
.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.program-dates {
    margin: 15px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.program-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.enrolled-badge {
    background: var(--success-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

.badge-inactive {
    background: #e0e0e0;
    color: #666;
}

.badge-frozen {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-active {
    background: #d4edda;
    color: #155724;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-draft {
    background: #e2e3e5;
    color: #383d41;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.points-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
}

/* Tables */
.table-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.card-header {
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.card-link:hover {
    text-decoration: underline;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table,
.simple-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td,
.simple-table th,
.simple-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th,
.simple-table th {
    background: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.admin-table tr:hover,
.simple-table tr:hover {
    background: #f8f9fa;
}

.text-center {
    text-align: center !important;
}

.actions-cell {
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Data Entry Tabs & Forms */
.data-entry-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    padding: 30px 0;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.entry-form-container {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.conditions-section {
    margin: 25px 0;
}

.conditions-list {
    margin-top: 15px;
}

.condition-item {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.condition-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.condition-checkbox {
    width: 20px !important;
    height: 20px;
    margin-right: 12px !important;
    margin-top: 3px;
    cursor: pointer;
}

.condition-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.condition-points {
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.condition-desc {
    margin: 10px 0 0 32px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.bonus-info-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.program-info-banner {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* Leaderboard */
.leaderboard-table table {
    width: 100%;
}

.rank-cell {
    text-align: center;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-weight: bold;
    background: #6c757d;
    color: var(--white);
    font-size: 1rem;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #C0C0C0, #808080);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.name-cell {
    font-weight: 600;
}

.you-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 8px;
}

.points-cell {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.current-user {
    background: #fff3cd !important;
    font-weight: bold;
}

.user-rank-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.rank-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.rank-number {
    text-align: center;
}

.rank-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

.rank-value {
    display: block;
    font-size: 3rem;
    font-weight: bold;
}

.rank-stats {
    display: flex;
    gap: 30px;
}

.rank-stat {
    text-align: center;
}

.rank-stat strong {
    display: block;
    font-size: 1.5rem;
}

.rank-stat span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Dashboard & Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.dashboard-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.card-content {
    padding: 20px;
}

.list-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--light-color);
    border-radius: 8px;
}

.item-info strong {
    display: block;
    margin-bottom: 5px;
}

.item-info small {
    color: var(--text-muted);
}

.empty-message,
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: 20px;
}

/* Quick Actions */
.quick-actions {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: var(--light-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    gap: 10px;
}

.action-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.action-icon {
    font-size: 2rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    color: var(--text-muted);
}

/* Filters */
.filters-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.filters-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.search-input,
.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

/* Form Cards */
.form-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

/* Condition Input Groups */
.condition-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.condition-name {
    flex: 2;
}

.condition-desc {
    flex: 2;
}

.condition-points {
    width: 100px;
}

/* Status Select */
.status-select {
    padding: 6px 12px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.status-select.status-draft {
    background: #e2e3e5;
    color: #383d41;
}

.status-select.status-active {
    background: #d4edda;
    color: #155724;
}

.status-select.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-select.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
}

.close:hover {
    color: var(--danger-color);
}

/* Order Input */
.order-input {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Clickable Badge */
.clickable {
    cursor: pointer;
    transition: transform 0.2s;
}

.clickable:hover {
    transform: scale(1.05);
}

/* Profile Grid */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.profile-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.profile-card h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.enrollment-history {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.enrollment-item {
    padding: 15px;
    background: var(--light-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.enrollment-item h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.enrollment-stats {
    display: flex;
    gap: 20px;
    margin: 10px 0;
}

.enrollment-stats .stat {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Report Tabs */
.report-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.tab-link {
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-weight: 600;
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-link:hover {
    color: var(--primary-color);
}

/* Simple Chart */
.chart-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.simple-chart {
    display: flex;
    gap: 20px;
    justify-content: space-around;
    align-items: flex-end;
    padding: 30px 20px;
    min-height: 250px;
}

.chart-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.chart-bar {
    width: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.bar-value {
    color: var(--white);
    font-weight: bold;
    padding: 5px;
    font-size: 0.9rem;
}

.chart-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Recent Entries / Entries Table */
.entries-table {
    margin-top: 20px;
}

.recent-entries-section {
    margin-top: 40px;
}

.conditions-cell {
    max-width: 450px;
    min-width: 300px;
}

.completed-conditions-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.completed-conditions-list li {
    padding: 5px 8px;
    border-bottom: 1px dashed #e9ecef;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 4px;
}

.completed-conditions-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.admin-table .text-center {
    text-align: center;
    vertical-align: middle;
}

.inactive-row {
    background-color: #fef2f2 !important;
}

.inactive-row:hover {
    background-color: #fee9e9 !important;
}

/* Responsive Design */
@media (max-width: 992px) {
    .stats-grid,
    .stats-grid-3,
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .stats-grid,
    .stats-grid-3,
    .stats-grid-4,
    .programs-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-actions,
    .form-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .header-actions .btn,
    .form-actions .btn {
        width: 100%;
    }
    
    .program-actions {
        flex-direction: column;
    }
    
    .program-actions .btn {
        width: 100%;
    }
    
    .action-buttons,
    .filters-form {
        grid-template-columns: 1fr;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .rank-card-content,
    .data-entry-tabs,
    .condition-input-group {
        flex-direction: column;
    }
    
    .rank-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .tab-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
    }
    
    .tab-btn.active {
        border-left-color: var(--primary-color);
        border-bottom-color: transparent;
    }
    
    .condition-name,
    .condition-desc,
    .condition-points {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container,
    .login-box,
    .register-box {
        padding: 15px;
    }
    
    .navbar-brand h1 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .rank-value {
        font-size: 2rem;
    }
    
    .simple-chart {
        overflow-x: auto;
        justify-content: flex-start;
    }
}

















/* Site Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 15px 20px;
    margin-top: 40px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.footer-left,
.footer-right {
    white-space: nowrap;
}

.site-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
