/* ============================================
   HAMALI LABOUR MANAGER - Mobile First Styles
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-card-hover: #263348;
    --bg-input: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.3);
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.2);
    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.2);
    --accent-yellow: #f59e0b;
    --accent-yellow-glow: rgba(245, 158, 11, 0.2);
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.2);
    --accent-orange: #f97316;
    --border-color: #334155;
    --border-light: rgba(255,255,255,0.06);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);
    --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.15);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --nav-height: 70px;
    --header-height: 60px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Code Badges */
.code-badge {
    font-size: 8px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 2px;
    display: inline-block;
    vertical-align: middle;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    text-transform: uppercase;
}
.code-badge-purple {
    background: var(--accent-purple);
    color: white;
}
.code-badge-blue {
    background: var(--accent-blue);
    color: white;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   Top Header
   ============================================ */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
    max-width: 600px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s;
}

.back-btn:active {
    transform: scale(0.92);
    background: var(--accent-blue);
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.header-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    background: white;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.today-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.12);
    padding: 5px 12px;
    border-radius: 20px;
}

.header-user-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s;
    margin-right: 8px;
}

.header-user-btn:active {
    transform: scale(0.92);
    background: var(--accent-blue);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    padding-top: calc(var(--header-height) + 12px);
    padding-bottom: calc(var(--nav-height) + 20px);
    padding-left: 14px;
    padding-right: 14px;
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ============================================
   Bottom Navigation
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.2s;
    color: var(--text-muted);
    position: relative;
    min-width: 56px;
}

.nav-item i {
    font-size: 20px;
    transition: all 0.2s;
}

.nav-item span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

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

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--accent-blue);
    border-radius: 0 0 4px 4px;
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-item.nav-add {
    transform: translateY(-8px);
}

.nav-add-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--accent-blue), #1e40af);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    margin-bottom: 2px;
    transition: all 0.2s;
    font-size: 20px;
}

.nav-item.nav-add.active .nav-add-icon {
    background: var(--accent-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.nav-item.nav-add.active::before {
    display: none;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.card:active {
    transform: scale(0.985);
    background: var(--bg-card-hover);
}

.card-glow-blue {
    box-shadow: var(--shadow-glow-blue);
    border-color: rgba(59, 130, 246, 0.2);
}

.card-glow-green {
    box-shadow: var(--shadow-glow-green);
    border-color: rgba(16, 185, 129, 0.2);
}

/* ============================================
   Dashboard Stats
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 0 0 0 60px;
    opacity: 0.08;
}

.stat-card.blue::after { background: var(--accent-blue); }
.stat-card.green::after { background: var(--accent-green); }
.stat-card.red::after { background: var(--accent-red); }
.stat-card.purple::after { background: var(--accent-purple); }

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}

.stat-icon.blue { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.stat-icon.green { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.stat-icon.red { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.stat-icon.purple { background: rgba(139,92,246,0.15); color: var(--accent-purple); }
.stat-icon.orange { background: rgba(249,115,22,0.15); color: var(--accent-orange); }
.stat-icon.yellow { background: rgba(245,158,11,0.15); color: var(--accent-yellow); }

.stat-value {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   Section Titles
   ============================================ */
.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title .view-all {
    font-size: 13px;
    color: var(--accent-blue);
    font-weight: 600;
}

/* ============================================
   Quick Actions
   ============================================ */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
}

.action-btn:active {
    transform: scale(0.95);
}

.action-btn .icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.action-btn .icon.blue { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.action-btn .icon.green { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.action-btn .icon.orange { background: rgba(249,115,22,0.15); color: var(--accent-orange); }
.action-btn .icon.purple { background: rgba(139,92,246,0.15); color: var(--accent-purple); }

/* ============================================
   Work Cards
   ============================================ */
.work-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
    cursor: pointer;
}

.work-card:active {
    transform: scale(0.98);
    background: var(--bg-card-hover);
}

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

.work-client {
    font-size: 15px;
    font-weight: 700;
}

.work-amount {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-green);
}

.work-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.work-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
}

.work-meta-item i {
    font-size: 11px;
    opacity: 0.7;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-received {
    background: rgba(16,185,129,0.15);
    color: var(--accent-green);
}

.badge-pending {
    background: rgba(239,68,68,0.15);
    color: var(--accent-red);
}

.badge-partial {
    background: rgba(245,158,11,0.15);
    color: var(--accent-yellow);
}

.badge-cash {
    background: rgba(16,185,129,0.15);
    color: var(--accent-green);
}

.badge-credit {
    background: rgba(249,115,22,0.15);
    color: var(--accent-orange);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ============================================
   Attendance Checkboxes
   ============================================ */
.attendance-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attendance-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    -webkit-user-select: none;
}

.attendance-item.checked {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.08);
}

.attendance-item:active {
    transform: scale(0.98);
}

.attendance-checkbox {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 14px;
    color: transparent;
}

.attendance-item.checked .attendance-checkbox {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.attendance-name {
    font-size: 15px;
    font-weight: 600;
    flex-grow: 1;
}

.attendance-phone {
    font-size: 12px;
    color: var(--text-muted);
}

.select-all-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 0;
}

.select-all-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s;
}

.select-all-btn.select {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.select-all-btn.deselect {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.select-all-btn:active {
    transform: scale(0.95);
}

.attendance-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-green);
}

/* ============================================
   Payment Type Toggle
   ============================================ */
.payment-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1.5px solid var(--border-color);
}

.toggle-btn {
    padding: 14px;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
    font-family: var(--font-family);
    color: var(--text-muted);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.toggle-btn.active-cash {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.1);
}

.toggle-btn.active-credit {
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-orange);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.1);
}

.toggle-btn:active {
    transform: scale(0.96);
}

/* ============================================
   Primary Buttons
   ============================================ */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:active {
    transform: scale(0.97);
    background: var(--bg-card-hover);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #dc2626);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #059669);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 13px;
    width: auto;
}

/* ============================================
   Per Share Display
   ============================================ */
.share-display {
    background: rgba(16, 185, 129, 0.08);
    border: 1.5px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    margin-bottom: 18px;
    transition: all 0.3s;
}

.share-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-amount {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-green);
    letter-spacing: -0.5px;
}

.share-info {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================
   Member Cards  
   ============================================ */
.member-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: all 0.2s;
}

.member-card:active {
    transform: scale(0.98);
    background: var(--bg-card-hover);
}

.member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
    color: white;
}

.member-info {
    flex-grow: 1;
    min-width: 0;
}

.member-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-phone-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.member-earnings {
    text-align: right;
    flex-shrink: 0;
}

.member-earnings-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-green);
}

.member-earnings-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Avatar colors */
.avatar-1 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.avatar-2 { background: linear-gradient(135deg, #10b981, #059669); }
.avatar-3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.avatar-4 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.avatar-5 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.avatar-6 { background: linear-gradient(135deg, #ec4899, #db2777); }
.avatar-7 { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.avatar-8 { background: linear-gradient(135deg, #f97316, #ea580c); }

/* ============================================
   Group Cards
   ============================================ */
.group-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.group-card:active {
    transform: scale(0.98);
    background: var(--bg-card-hover);
}

.group-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(59, 130, 246, 0.12);
    flex-shrink: 0;
}

.group-info {
    flex-grow: 1;
}

.group-name {
    font-size: 16px;
    font-weight: 700;
}

.group-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.group-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   Credit List
   ============================================ */
.credit-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 10px;
    border-left: 4px solid var(--accent-orange);
    border-top: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.credit-card.partial {
    border-left-color: var(--accent-yellow);
}

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

.credit-client {
    font-size: 15px;
    font-weight: 700;
}

.credit-amount {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-orange);
}

.credit-details {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.credit-detail-item {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.credit-progress {
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.credit-progress-bar {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
    transition: width 0.5s ease;
}

.credit-actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   Receipt List
   ============================================ */
.receipt-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.receipt-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.receipt-info {
    flex-grow: 1;
}

.receipt-amount-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-green);
}

.receipt-date-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================
   Reports
   ============================================ */
.report-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.report-filter::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-family);
}

.filter-chip.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--accent-blue);
}

.filter-chip:active {
    transform: scale(0.95);
}

.report-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
}

.report-summary-row:last-child {
    border-bottom: none;
}

.report-summary-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.report-summary-value {
    font-size: 15px;
    font-weight: 700;
}

/* ============================================
   Work Detail Page
   ============================================ */
.detail-section {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
}

.detail-amount-large {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-green);
    text-align: center;
    padding: 20px 0;
}

.attendee-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attendee-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-blue);
}

.attendee-chip .share-text {
    font-size: 11px;
    color: var(--accent-green);
    font-weight: 700;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ============================================
   Modal
   ============================================ */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
}

.modal-backdrop.show {
    display: block;
}

.modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 24px 20px 40px;
    z-index: 201;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 85vh;
    overflow-y: auto;
}

.modal.show {
    transform: translateY(0);
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ============================================
   Toast
   ============================================ */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

/* ============================================
   Filters bar
   ============================================ */
.filters-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filters-bar .form-select,
.filters-bar .form-input {
    padding: 10px 12px;
    font-size: 14px;
    flex: 1;
    min-width: 0;
}

/* ============================================
   Delete / Action buttons inline
   ============================================ */
.inline-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    font-family: var(--font-family);
}

.btn-icon:active {
    transform: scale(0.9);
}

.btn-icon-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

.btn-icon-edit {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
}

/* ============================================
   Loading spinner
   ============================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

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

/* ============================================
   Utility
   ============================================ */
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-orange { color: var(--accent-orange); }
.text-blue { color: var(--accent-blue); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hidden { display: none !important; }


/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s ease-out;
}

.stagger-1 { animation-delay: 0.05s; animation-fill-mode: both; }
.stagger-2 { animation-delay: 0.1s; animation-fill-mode: both; }
.stagger-3 { animation-delay: 0.15s; animation-fill-mode: both; }
.stagger-4 { animation-delay: 0.2s; animation-fill-mode: both; }

/* ============================================
   Custom Autocomplete Dropdown
   ============================================ */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    display: none;
    animation: fadeInUp 0.2s ease-out;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s;
}

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

.suggestion-item:hover, 
.suggestion-item.active {
    background: var(--accent-blue);
    color: white;
}

.suggestion-item i {
    margin-right: 10px;
    color: var(--text-muted);
}

.suggestion-item:hover i,
.suggestion-item.active i {
    color: white;
}

/* ============================================
   Responsive Desktop 
   ============================================ */
@media (min-width: 768px) {
    body {
        background: #0b1120;
    }

    .main-content {
        max-width: 480px;
        margin: 0 auto;
        background: var(--bg-primary);
        min-height: 100vh;
        box-shadow: -1px 0 0 var(--border-light), 1px 0 0 var(--border-light);
    }

    .top-header {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }

    .bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }

    .modal {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
    }

    .modal.show {
        transform: translateX(-50%) translateY(0);
    }
}

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

.flex-gap {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mt-20 { margin-top: 20px; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.fw-700 { font-weight: 700; }

/* Bricks Theme */
.bricks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.brick {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
}

.brick:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.05);
}

.brick-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.brick-label {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.brick.blue .brick-icon { color: var(--accent-blue); background: rgba(59, 130, 246, 0.1); }
.brick.green .brick-icon { color: var(--accent-green); background: rgba(16, 185, 129, 0.1); }
.brick.purple .brick-icon { color: var(--accent-purple); background: rgba(139, 92, 246, 0.1); }
.brick.orange .brick-icon { color: var(--accent-orange); background: rgba(245, 158, 11, 0.1); }
.brick.red .brick-icon { color: var(--accent-red); background: rgba(239, 68, 68, 0.1); }

/* Thermal Printer Optimization (80mm) */
@media print {
    body {
        width: 80mm;
        margin: 0 auto;
        background: #fff;
        color: #000;
        padding: 0;
        font-weight: 600;
    }

    .no-print, .bottom-nav, .header, .filters-bar {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    .thermal-receipt {
        width: 100%;
        padding: 5px;
    }

    .thermal-header {
        text-align: center;
        border-bottom: 2px dashed #000;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .thermal-title {
        font-size: 11px;
        font-weight: bold;
        margin-bottom: 5px;
    }

    .thermal-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
        font-weight: 700;
    }

    .thermal-table th, .thermal-table td {
        text-align: left;
        padding: 4px 0;
    }

    .thermal-table .text-right {
        text-align: right;
    }

    .thermal-divider {
        border-bottom: 1px dashed #000;
        margin: 5px 0;
    }

    .thermal-total {
        font-size: 15px;
        font-weight: 900;
        display: flex;
        justify-content: space-between;
        margin-top: 10px;
        border-top: 1px double #000;
        padding-top: 5px;
    }

    .thermal-footer {
        text-align: center;
        margin-top: 20px;
        font-size: 10px;
    }
}
