/* =====================================================
   Ganitri Residence - Custom Styles
   Dark Mode + Glassmorphism + Animations
   ===================================================== */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    --primary: #00880F; /* Gojek Green */
    --primary-light: #00AA13;
    --primary-dark: #00660B;
    --accent: #00AED6; /* GoPay Blue */
    --accent-light: #4ACEEA;
    --danger: #EE2737; /* Gojek Red */
    --danger-light: #F4525E;
    --info: #00AED6; /* GoPay Blue */
    --success: #22c55e;
    --warning: #f59e0b;
    
    --bg-dark: #F5F6F8; /* Gojek light gray background */
    --bg-card: #FFFFFF;
    --bg-card-hover: #F2F4F7;
    --bg-input: #F5F6F8;
    --border: #E8E8E8;
    --border-light: #F0F0F0;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: calc(70px + var(--safe-area-bottom));
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

/* =====================================================
   GLASSMORPHISM COMPONENTS
   ===================================================== */

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   GRADIENT BACKGROUNDS
   ===================================================== */

.gradient-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.gradient-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
}

.gradient-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
}

.gradient-info {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.gradient-mesh {
    background: 
        radial-gradient(at 40% 20%, rgba(5, 150, 105, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(217, 119, 6, 0.1) 0px, transparent 50%);
}

/* =====================================================
   LAYOUT
   ===================================================== */

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

.page-content {
    padding: 1rem;
    padding-top: 70px;
    padding-bottom: 90px;
}

/* =====================================================
   HEADER
   ===================================================== */

.app-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.header-logo .logo-text {
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-action-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.header-action-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* DND Status Bar */
.dnd-bar {
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid rgba(217, 119, 6, 0.3);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.dnd-bar.active {
    background: rgba(217, 119, 6, 0.25);
}

/* =====================================================
   BOTTOM NAVIGATION
   ===================================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + var(--safe-area-bottom));
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
    position: relative;
}

.nav-item .nav-icon {
    font-size: 1.4rem;
    transition: transform 0.2s;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-item:hover {
    color: var(--accent);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    top: -0.5rem;
    width: 24px;
    height: 3px;
    background: var(--accent);
    border-radius: var(--radius-full);
}

/* =====================================================
   FAB PANIC BUTTON
   ===================================================== */

.fab-panic {
    position: fixed;
    bottom: calc(80px + var(--safe-area-bottom));
    right: calc(50% - 220px);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5);
    animation: panic-glow 3s ease-in-out infinite;
    transition: transform 0.2s;
    text-decoration: none;
}

.fab-panic:hover {
    transform: scale(1.1);
}

.fab-panic:active {
    transform: scale(0.95);
}

@keyframes panic-glow {
    0%, 100% { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(220, 38, 38, 0.7); }
}

/* =====================================================
   CARDS
   ===================================================== */

.stat-card {
    padding: 1rem;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Bill Card */
.bill-card {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.bill-card .bill-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-light);
}

.bill-card .bill-period {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.bill-card .bill-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.bill-status.unpaid { background: rgba(220, 38, 38, 0.2); color: #fca5a5; }
.bill-status.paid { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.bill-status.overdue { background: rgba(217, 119, 6, 0.2); color: #fcd34d; }

/* =====================================================
   QUICK ACTION GRID
   ===================================================== */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-action:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.quick-action .action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.quick-action .action-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* =====================================================
   FORMS
   ===================================================== */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* =====================================================
   ALERTS / FLASH MESSAGES
   ===================================================== */

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid rgba(217, 119, 6, 0.3);
    color: #fcd34d;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   BADGES & STATUS
   ===================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-success { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.badge-danger { background: rgba(220, 38, 38, 0.2); color: #fca5a5; }
.badge-warning { background: rgba(217, 119, 6, 0.2); color: #fcd34d; }
.badge-info { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.badge-primary { background: rgba(5, 150, 105, 0.2); color: #6ee7b7; }

/* =====================================================
   LIST ITEMS
   ===================================================== */

.list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.list-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.list-item .item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.list-item .item-content {
    flex: 1;
    min-width: 0;
}

.list-item .item-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item .item-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.list-item .item-meta {
    text-align: right;
    flex-shrink: 0;
}

/* =====================================================
   SECTION HEADERS
   ===================================================== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    margin-top: 1.25rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-link {
    font-size: 0.8rem;
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
}

/* =====================================================
   FEED / ANNOUNCEMENT CARDS
   ===================================================== */

.feed-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}

.feed-card:hover {
    border-color: var(--border-light);
}

.feed-card .feed-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.feed-card .feed-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.feed-card .feed-body {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.feed-pinned {
    border-color: rgba(217, 119, 6, 0.3);
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.05), transparent);
}

/* =====================================================
   TABLES (Mobile-friendly)
   ===================================================== */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tr:hover td {
    background: rgba(30, 41, 59, 0.5);
}

/* =====================================================
   MODALS
   ===================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.5rem;
    animation: slideUp 0.3s ease;
}

.modal-content .modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    margin: 0 auto 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

.animate-in {
    animation: fadeSlideIn 0.4s ease forwards;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.shimmer {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =====================================================
   PANIC BUTTON FULL (Standalone page)
   ===================================================== */

.panic-container {
    min-height: 100vh;
    background: #0a0e1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.panic-btn-large {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    border: 4px solid rgba(255, 255, 255, 0.15);
    font-size: 2rem;
    font-weight: 800;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.4);
    transition: all 0.3s;
    user-select: none;
    -webkit-user-select: none;
}

.panic-btn-large .panic-text {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

.panic-btn-large:active {
    transform: scale(0.95);
    box-shadow: 0 0 60px rgba(220, 38, 38, 0.7);
}

.panic-progress-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--accent);
    opacity: 0;
    transition: opacity 0.2s;
}

.panic-progress-ring.active {
    opacity: 1;
    animation: spin 3s linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.panic-status {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.panic-cancel-bar {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(217, 119, 6, 0.2);
    border: 1px solid rgba(217, 119, 6, 0.3);
    border-radius: var(--radius-md);
    display: none;
}

.panic-cancel-bar.active {
    display: block;
    animation: slideDown 0.3s ease;
}

/* =====================================================
   QR CODE
   ===================================================== */

.qr-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
}

.qr-container canvas,
.qr-container img {
    max-width: 200px;
    margin: 0 auto;
}

/* =====================================================
   CHART CONTAINER
   ===================================================== */

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.chart-container canvas {
    max-height: 250px;
}

/* =====================================================
   UTILITIES
   ===================================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-muted { color: var(--text-secondary); }
.text-primary { color: var(--primary-light); }
.text-danger { color: var(--danger-light); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-bold { font-weight: 700; }
.text-extra-bold { font-weight: 800; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

.w-full { width: 100%; }
.rounded-lg { border-radius: var(--radius-lg); }
.overflow-hidden { overflow: hidden; }
.hidden { display: none; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }

/* =====================================================
   AUTH PAGES SPECIAL
   ===================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.15), transparent 70%);
    top: -100px;
    right: -100px;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent 70%);
    bottom: -50px;
    left: -100px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo .logo-big {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 0.75rem;
    box-shadow: 0 8px 30px rgba(5, 150, 105, 0.3);
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* =====================================================
   ADMIN LAYOUT
   ===================================================== */

.admin-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
}

.admin-content {
    padding: 1.5rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* =====================================================
   EMPTY STATES
   ===================================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state .empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state .empty-desc {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* =====================================================
   TOGGLE SWITCH
   ===================================================== */

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background 0.3s;
}

.toggle.active {
    background: var(--primary);
}

.toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle.active::after {
    transform: translateX(20px);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (min-width: 480px) {
    .app-container {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
}

@media (max-width: 320px) {
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bill-card .bill-amount {
        font-size: 1.5rem;
    }
}

/* Landscape safety */
@media (orientation: landscape) and (max-height: 500px) {
    .panic-btn-large {
        width: 120px;
        height: 120px;
    }
}
