/* ========================================
   MESS MANAGEMENT SYSTEM - GLOBAL STYLES
   Mobile-First Responsive Design
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #4A90A4;
    --primary-dark: #357A8C;
    --secondary-color: #F5A623;
    --success-color: #27AE60;
    --danger-color: #E74C3C;
    --warning-color: #F39C12;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --text-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
}

p {
    font-size: 0.938rem;
    color: var(--text-light);
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-center {
    text-align: center;
}

/* ========================================
   SPLASH SCREEN
   ======================================== */
.splash-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
}

.splash-logo {
    width: 120px;
    height: 120px;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.splash-logo i {
    font-size: 3rem;
    color: var(--primary-color);
}

.splash-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.splash-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.splash-loader {
    margin-top: 40px;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-container {
    min-height: 100vh;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}

.login-logo i {
    font-size: 2rem;
    color: var(--text-white);
}

.login-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 0.938rem;
}

.login-form {
    flex: 1;
}

.role-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.role-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-white);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.role-btn.active {
    border-color: var(--primary-color);
    background: rgba(74, 144, 164, 0.1);
}

.role-btn i {
    font-size: 1.5rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 8px;
}

.role-btn.active i {
    color: var(--primary-color);
}

.role-btn span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

.role-btn.active span {
    color: var(--primary-color);
}

/* Meal Time Selector (Sakal/Sandhyakal) */
.meal-time-selector {
    display: flex;
    gap: 12px;
}

.meal-time-btn {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-white);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.meal-time-btn.active {
    border-color: var(--primary-color);
    background: rgba(74, 144, 164, 0.1);
}

.meal-time-btn i {
    font-size: 1.75rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 8px;
}

.meal-time-btn.active i {
    color: var(--secondary-color);
}

.meal-time-btn[data-meal="morning"].active i {
    color: #F5A623;
}

.meal-time-btn[data-meal="evening"].active i {
    color: #9B59B6;
}

.meal-time-btn span {
    font-size: 0.938rem;
    font-weight: 600;
    color: var(--text-light);
}

.meal-time-btn.active span {
    color: var(--primary-color);
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-input::placeholder {
    color: var(--text-light);
}

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

.input-icon-wrapper .form-input {
    padding-left: 48px;
}

.input-icon-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.125rem;
}

.input-icon-right {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.125rem;
    cursor: pointer;
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-white);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237F8C8D' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-white);
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 0.875rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

.forgot-link {
    display: block;
    text-align: right;
    color: var(--primary-color);
    font-size: 0.875rem;
    text-decoration: none;
    margin-top: 12px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.header-back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.125rem;
}

.header-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 1.25rem;
    cursor: pointer;
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--bg-white);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

.nav-item i {
    font-size: 1.375rem;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item span {
    font-weight: 500;
}

/* ========================================
   PAGE CONTENT
   ======================================== */
.page-content {
    padding: 20px;
    padding-bottom: 100px;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-light);
    font-size: 0.938rem;
}

/* ========================================
   DASHBOARD CARDS
   ======================================== */
.dashboard-greeting {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: var(--text-white);
    margin-bottom: 24px;
}

.greeting-text {
    font-size: 0.938rem;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.greeting-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.greeting-date {
    font-size: 0.875rem;
    color: #FFFFFF;
    margin-top: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* 3 columns grid for mobile - use when exactly 3 cards */
.stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stats-grid-3 .stat-card {
    padding: 12px 8px;
}

.stats-grid-3 .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
}

.stats-grid-3 .stat-value {
    font-size: 0.875rem;
}

.stats-grid-3 .stat-label {
    font-size: 0.625rem;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.375rem;
}

.stat-icon.blue {
    background: rgba(74, 144, 164, 0.15);
    color: var(--primary-color);
}

.stat-icon.green {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success-color);
}

.stat-icon.orange {
    background: rgba(245, 166, 35, 0.15);
    color: var(--secondary-color);
}

.stat-icon.red {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger-color);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.813rem;
    color: var(--text-light);
}

/* ========================================
   SECTION HEADER
   ======================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.section-link {
    color: var(--primary-color);
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
}

/* ========================================
   CARDS & LIST ITEMS
   ======================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.member-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.25rem;
    font-weight: 600;
    flex-shrink: 0;
}

.member-info {
    flex: 1;
}

.member-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.member-meta {
    font-size: 0.813rem;
    color: var(--text-light);
}

.member-action {
    color: var(--text-light);
    font-size: 1.25rem;
}

/* ========================================
   BADGES & STATUS
   ======================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger-color);
}

.badge-primary {
    background: rgba(74, 144, 164, 0.15);
    color: var(--primary-color);
}

/* ========================================
   SEARCH BAR
   ======================================== */
.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg-white);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.125rem;
}

/* ========================================
   PRICE CARDS
   ======================================== */
.price-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    text-align: center;
}

.price-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.75rem;
}

.price-icon.monthly {
    background: rgba(74, 144, 164, 0.15);
    color: var(--primary-color);
}

.price-icon.dabba {
    background: rgba(245, 166, 35, 0.15);
    color: var(--secondary-color);
}

.price-type {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-period {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ========================================
   ATTENDANCE
   ======================================== */
.date-picker {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.date-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.date-nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    cursor: pointer;
}

.date-display {
    text-align: center;
}

.date-day {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.date-full {
    font-size: 0.875rem;
    color: var(--text-light);
}

.attendance-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.attendance-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.attendance-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 600;
}

.attendance-info {
    flex: 1;
}

.attendance-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.attendance-type {
    font-size: 0.813rem;
    color: var(--text-light);
}

.attendance-details {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.attendance-detail {
    flex: 1;
    text-align: center;
}

.attendance-detail-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.attendance-detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* ========================================
   PAYMENT
   ======================================== */
.payment-summary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: var(--text-white);
    margin-bottom: 24px;
}

.payment-summary-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 4px;
}

.payment-summary-amount {
    font-size: 2.5rem;
    font-weight: 700;
}

.payment-summary-row {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.payment-summary-item {
    text-align: center;
}

.payment-summary-item-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.payment-summary-item-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

.payment-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.payment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.payment-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.payment-card-date {
    font-size: 0.813rem;
    color: var(--text-light);
}

.payment-card-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* ========================================
   PROFILE
   ======================================== */
.profile-header {
    text-align: center;
    padding: 24px;
    background: var(--bg-white);
    margin: -20px -20px 24px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-white);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.profile-role {
    color: var(--text-light);
    font-size: 0.938rem;
}

.profile-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.profile-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.profile-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-right: 14px;
}

.profile-item-content {
    flex: 1;
}

.profile-item-label {
    font-size: 0.813rem;
    color: var(--text-light);
    margin-bottom: 2px;
}

.profile-item-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.logout-btn {
    width: 100%;
    padding: 16px;
    background: rgba(231, 76, 60, 0.1);
    border: none;
    border-radius: var(--radius);
    color: var(--danger-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ========================================
   QUICK ACTIONS
   ======================================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.quick-action {
    text-align: center;
    text-decoration: none;
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1.5rem;
}

.quick-action-label {
    font-size: 0.75rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* ========================================
   FILTER TABS
   ======================================== */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-tab {
    padding: 10px 20px;
    border: none;
    background: var(--bg-white);
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow);
}

.filter-tab.active {
    background: var(--primary-color);
    color: var(--text-white);
}

/* ========================================
   FLOATING ACTION BUTTON
   ======================================== */
.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    border: none;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    text-decoration: none;
    z-index: 50;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-light);
    font-size: 0.938rem;
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 200;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 1.25rem;
}

/* ========================================
   TOGGLE SWITCH
   ======================================== */
.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ========================================
   QUANTITY SELECTOR
   ======================================== */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quantity-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-dark);
    cursor: pointer;
}

.quantity-btn:active {
    background: var(--bg-light);
}

.quantity-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    min-width: 50px;
    text-align: center;
}

/* ========================================
   DIVIDER
   ======================================== */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* ========================================
   UTILITIES
   ======================================== */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

.hidden {
    display: none;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.animate-slideUp {
    animation: slideUp 0.3s ease;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.938rem;
}

.alert i {
    font-size: 1.125rem;
}

.alert-success {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success-color);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger-color);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning-color);
}

.alert-info {
    background: rgba(74, 144, 164, 0.15);
    color: var(--primary-color);
}

/* ========================================
   MODAL IMPROVEMENTS
   ======================================== */
.modal-overlay {
    display: none;
}

.modal-overlay.active {
    display: flex;
}

.modal-overlay .modal {
    animation: slideUp 0.3s ease;
}

/* ========================================
   FORM HINTS
   ======================================== */
.form-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 6px;
}

/* Badge secondary */
.badge-secondary {
    background: rgba(127, 140, 141, 0.15);
    color: var(--text-light);
}

/* Empty state icon styling */
.empty-state i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 16px;
}

/* Link styling in filter tabs */
.filter-tabs a.filter-tab {
    text-decoration: none;
}

/* Date nav button as link */
a.date-nav-btn {
    text-decoration: none;
}

/* ========================================
   DROPDOWN MENU
   ======================================== */
.dropdown {
    position: relative;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: background 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-light);
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 8px 0;
    z-index: 100;
    display: none;
    animation: fadeIn 0.2s ease;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bg-light);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--text-light);
}

/* ========================================
   MODAL CONTENT STYLES
   ======================================== */
.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    padding: 24px;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0;
    border: none;
}

.modal-content .modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.modal-content .modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
}

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

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    body {
        max-width: 540px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    body {
        max-width: 720px;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    body {
        max-width: 960px;
    }

    .bottom-nav {
        max-width: 960px;
    }
}

/* Desktop view - show sidebar navigation */
@media (min-width: 1200px) {
    body {
        max-width: 480px;
    }

    .bottom-nav {
        max-width: 480px;
    }
}

/* Print styles */
@media print {
    .header,
    .bottom-nav,
    .fab,
    .btn {
        display: none !important;
    }

    .page-content {
        padding-bottom: 20px;
    }

    body {
        max-width: 100%;
    }
}
