.mobile-logout { display: none !important; }
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #f5eedc; /* Saman rengi (Straw) base */
    --card-bg: rgba(255, 255, 255, 0.7); /* Lighter cards */
    --card-border: rgba(0, 0, 0, 0.08); /* Darker border for light theme */
    --primary: #8b4513; /* Slightly darker primary */
    --primary-hover: #a0522d;
    --secondary: #2e8b57; /* Darker secondary */
    --secondary-hover: #228b22;
    --text-color: #3e2723; /* Dark text */
    --text-muted: #6d4c41; /* Muted dark text */
    --success: #2e8b57;
    --danger: #dc2626;
    --accent: #d97706;
    --header-bg: #f5eedc; /* Match body background */
    --tfr-glow: rgba(46, 139, 87, 0.2);

    /* Typography Standards */
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-size-base: 16px;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --line-height-relaxed: 1.6;
    --mobile-nav-height: 56px;
    --mobile-nav-safe-bottom: env(safe-area-inset-bottom, 0px);
    --ios-bottom-offset: 0px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    background: radial-gradient(circle at 50% 50%, #fdfbf7 0%, var(--bg-color) 100%);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100%;
    display: flex;
    flex-direction: column;
    line-height: var(--line-height-relaxed);
    overflow-x: hidden;
}

html {
    height: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

p {
    font-size: var(--font-size-md);
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
}

/* Header Styling */
.main-header {
    background: var(--header-bg);
    border-bottom: 2px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 1000; /* Increased to stay above all content */
    padding-top: env(safe-area-inset-top); 
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

.logo .icon {
    font-size: 1.6rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-item:hover {
    color: var(--primary);
    background: rgba(139, 69, 19, 0.08);
    border-color: rgba(0, 0, 0, 0.08);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(139, 69, 19, 0.15);
    border-color: rgba(139, 69, 19, 0.3);
    box-shadow: 0 0 12px rgba(139, 69, 19, 0.1);
}

.logout-btn {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #ef4444;
    color: var(--text-color);
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* Footer */
.main-footer {
    background: rgba(245, 238, 220, 0.9);
    border-top: 1px solid var(--card-border);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Common Components */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Dashboard View */
.dashboard-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
}

.welcome-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.welcome-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #5d4037 0%, #a0522d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(139, 69, 19, 0.05);
}

.welcome-header p {
    color: #6d4c41;
    font-size: 1.1rem;
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

/* Admin specific welcome header */
.admin-wrapper .welcome-header h1 {
    background: linear-gradient(135deg, #3e2723 0%, #8b4513 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-wrapper .welcome-header p {
    color: #5d4037;
}

.date-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.date-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column; /* Ensure vertical stack */
    align-items: stretch;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.date-header-row {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    width: 100%;
}

.date-chevron {
    flex-shrink: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--card-border);
    background: rgba(0,0,0,0.04);
    line-height: 1;
    transition: transform 0.2s;
    user-select: none;
}


.date-card-content {
    max-height: 20000px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.date-card.collapsed .date-card-content {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
    display: none; /* Forced hide */
}

.date-card.collapsed {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.date-card:not(.collapsed) .date-header-row {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.date-badge {
    font-size: 1.1rem;
    font-weight: 600;
}

.city-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.city-btn {
    background: var(--primary);
    color: #ffffff;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(139, 69, 19, 0.2);
}

.city-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(139, 69, 19, 0.3);
}

.empty-card {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Bulletin View */
.bulletin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.bulletin-title h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.bulletin-title p {
    color: var(--text-muted);
}

.action-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Coupons Grid */
.coupons-section {
    margin-bottom: 2.5rem;
}

.coupons-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.coupon-card {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%);
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.coupon-card.alt-coupon {
    border-color: rgba(46, 139, 87, 0.2);
    background: linear-gradient(135deg, rgba(46, 139, 87, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%);
}

.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.coupon-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.coupon-badge {
    background: var(--primary);
    color: #ffffff;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.coupon-card.alt-coupon .coupon-badge {
    background: var(--secondary);
}

.coupon-legs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.coupon-leg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.02);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.leg-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.leg-selections {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.leg-at {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: help;
}

.coupon-summary {
    border-top: 1px solid var(--card-border);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comb-count {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.comb-count strong {
    color: var(--text-color);
}

.coupon-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
}

/* Race Card Section */
.race-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
}

.race-tabs::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.race-tab-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.race-tab-btn:hover {
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.05);
}

.race-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.race-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.race-card-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--card-border);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.race-meta-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.race-number-badge {
    background: var(--primary);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(139, 69, 19, 0.3);
}

.race-name-details h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.race-name-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.race-meta-right {
    display: flex;
    gap: 0.75rem;
}

.meta-pill {
    background: rgba(139, 69, 19, 0.08);
    border: 1px solid var(--card-border);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.meta-pill.time-pill {
    border-color: rgba(217, 119, 6, 0.3);
    color: var(--accent);
    background: rgba(217, 119, 6, 0.05);
}

/* Custom Responsive Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.bulletin-table {
    width: max-content; /* Let columns define the width */
    min-width: 100%;    /* But at least full width of container */
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
    table-layout: auto;
}

.bulletin-table th, .bulletin-table td {
    white-space: nowrap; /* Prevent columns from shrinking/wrapping */
    padding: 0.75rem 0.85rem;
}

.score-col, .score-header-col {
    min-width: 60px;
    text-align: center;
}

.galop-desc-col, .galop-desc-header-col {
    min-width: 200px;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bulletin-table th {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--card-border);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bulletin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

.bulletin-table tr {
    transition: background-color 0.2s ease;
}

.bulletin-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.at-no-col {
    font-weight: 700;
    color: var(--text-muted);
    width: 40px;
}

.at-name-col {
    font-weight: 600;
}

.at-name-link {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.at-name-link:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.agf-badge {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--card-border);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.score-col {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.galop-desc-col {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tfr-col {
    font-weight: 700;
    text-align: right;
}

.tfr-badge {
    background: var(--tfr-glow);
    color: var(--secondary);
    border: 1px solid rgba(46, 139, 87, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 0 10px var(--tfr-glow);
    text-shadow: 0 0 4px rgba(46, 139, 87, 0.4);
}

.bulletin-table tr:first-child .tfr-badge {
    background: rgba(46, 139, 87, 0.3);
    color: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(46, 139, 87, 0.3);
}

/* Horse Profile View */
.horse-profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media(min-width: 768px) {
    .horse-profile-grid {
        grid-template-columns: 300px 1fr;
    }
}

.horse-sidebar {
    height: fit-content;
}

.horse-avatar {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.horse-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.horse-title h2 {
    font-size: 1.6rem;
    font-weight: 700;
}

.horse-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.horse-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid var(--card-border);
    padding-top: 1rem;
}

.horse-meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.meta-label {
    color: var(--text-muted);
}

.meta-value {
    font-weight: 600;
}

/* Search Box Container */
.search-container {
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--card-border);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.2);
}

.search-btn {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-hover);
}

/* Truly Minimalist Date-Only Collapsible */
.date-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-card-content {
    max-height: 10000px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.date-card.collapsed .date-card-content {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.date-card.collapsed {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem; /* Tighter list for past programs */
}

.date-header-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    cursor: pointer;
    user-select: none;
}

.date-card:not(.collapsed) .date-header-row {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.date-card.collapsed .toggle-icon {
    transform: rotate(0deg);
}

.date-card:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

/* Header for Past Programs Section */
.past-programs-title {
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-muted);
}

/* Collapsible Coupon History */
.coupon-history-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.coupon-history-header {
    cursor: pointer;
    user-select: none;
    width: 100%;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.coupon-history-card:not(.collapsed) .coupon-history-header {
    border-bottom: 1px solid var(--card-border) !important;
    padding-bottom: 1rem !important;
    margin-bottom: 1.25rem !important;
}

.coupon-card-content {
    max-height: 5000px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.coupon-history-card.collapsed .coupon-card-content {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
    display: none;
}

.coupon-history-card.collapsed {
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 0.75rem;
}

/* Dashboard Winners Grid */
.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.5rem 0;
    max-width: 100%;
    overflow-x: hidden;
}

.winner-mini-card {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

/* Fix for Analysis text overflow */
.daily-summary-item, .daily-results-item {
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.winner-mini-card:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(46, 139, 87, 0.2);
}

.winner-k-no {
    background: var(--primary);
    color: #ffffff;
    min-width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.winner-horse-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.winner-horse-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winner-horse-no {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 800;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    /* Columns are now visible on all screens */
}

/* Utility Classes */
.show-mobile { display: none !important; }
.show-desktop { display: inline-block !important; }

@media (max-width: 768px) {
    .show-mobile { display: inline-block !important; }
    .show-desktop { display: none !important; }
    .hide-mobile {
        display: none !important;
    }
    .main-tabs {
        gap: 0.5rem;
        padding-bottom: 0.75rem;
        margin-bottom: 1.5rem;
    }
    .main-tab-btn {
        white-space: nowrap;
    }
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    .main-content {
        padding: 1rem 0.5rem calc(var(--mobile-nav-height) + var(--mobile-nav-safe-bottom) + 16px);
    }
    .card {
        padding: 1rem 0.75rem; /* Reduced card internal padding */
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    .dashboard-wrapper, .horse-wrapper, .bulletin-wrapper, .my-coupons-wrapper {
        margin: 0 auto;
    }
    .desktop-nav {
        display: none !important;
    }
    .mobile-menu-toggle {
        display: flex !important;
        position: relative;
        align-items: center;
        justify-content: center;
        background: rgba(139, 69, 19, 0.08);
        border: 1px solid rgba(139, 69, 19, 0.15);
        border-radius: 8px;
        width: 40px;
        height: 40px;
        padding: 0;
        cursor: pointer;
        z-index: 10001;
    }
    .mobile-logout {
        display: none !important; /* Moved into off-canvas */
    }
    .bulletin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .action-bar {
        width: 100%;
        justify-content: space-between;
    }
    .date-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .city-buttons {
        width: 100%;
    }
    .city-btn {
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
    }
    .cta-card {
        padding: 1.5rem 1rem !important;
    }
    .live-pulse-card, .success-rate-card {
        padding: 1.25rem !important;
    }
    .winners-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }
    .welcome-header h1 {
        font-size: 1.75rem !important;
    }
    .welcome-header p {
        font-size: 1rem !important;
    }
    .winner-mini-card {
        width: 100% !important;
    }
    .city-btn {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    .date-badge {
        font-size: 1.1rem !important;
    }
    .daily-summary-item {
        padding: 1rem !important;
        font-size: 0.9rem !important;
    }
    /* galop details are now visible on mobile */
    body {
        padding-bottom: 0 !important;
    }
}

/* Premium Minimalist Two-Line Menu Icon */
.hamburger-box {
    width: 20px;
    height: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.hamburger-inner {
    display: none; /* Hide middle line */
}

.hamburger-box::before,
.hamburger-box::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), width 0.3s ease;
}

.hamburger-box::after {
    width: 65%;
    align-self: flex-end;
}

/* Active Morph to X */
.mobile-menu-toggle.active .hamburger-box::before {
    transform: translateY(5px) rotate(-45deg);
    width: 100%;
}

.mobile-menu-toggle.active .hamburger-box::after {
    transform: translateY(-5px) rotate(45deg);
    width: 100%;
}

/* Off-canvas Menu Styles */
.off-canvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.off-canvas-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.off-canvas-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, #fff 0%, var(--bg-color) 100%);
    z-index: 100000;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    display: flex;
    flex-direction: column;
}

.off-canvas-menu.open {
    transform: translateX(-280px);
}

.off-canvas-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
}

.off-canvas-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Racing Sans One', sans-serif;
    letter-spacing: 1px;
}

.close-menu {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.off-canvas-nav {
    flex: 1;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.off-canvas-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.off-canvas-item:active, .off-canvas-item.active {
    background: rgba(139, 69, 19, 0.08);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

.off-canvas-icon {
    font-size: 1.25rem;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.off-canvas-divider {
    height: 1px;
    background: var(--card-border);
    margin: 1rem 1.5rem;
}

.logout-item {
    color: #dc2626 !important;
    margin-top: auto;
    background: rgba(220, 38, 38, 0.05);
}

.off-canvas-notif-badge {
    position: static !important;
    margin-left: auto;
    margin-right: 0.5rem;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: none !important;
    box-shadow: none !important;
}

.mobile-menu-toggle { display: none; }
.mobile-nav { display: none; }

/* Main Toggle Tabs */
.main-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
}

.main-tab-btn {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.main-tab-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

.main-tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
}

/* Race Analysis Commentary Box */
.race-analysis-box {
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid var(--card-border);
    padding: 1.25rem 1.5rem;
}

.analysis-tag {
    display: inline-block;
    background: rgba(217, 119, 6, 0.15);
    color: var(--accent);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.analysis-text {
    font-size: var(--font-size-md);
    line-height: var(--line-height-relaxed);
    color: var(--text-color);
}

.analysis-text strong {
    color: var(--text-color);
    font-weight: 600;
}

/* --- Admin panel --- */
.pulse-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: adminPulse 1.5s infinite;
}
@keyframes adminPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(139, 69, 19, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(139, 69, 19, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(139, 69, 19, 0); }
}

.admin-wrapper .welcome-header { margin-bottom: 1.25rem; }

.admin-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}
.admin-subnav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}
.admin-subnav-link:hover { color: var(--text-color); background: rgba(0, 0, 0, 0.05); }
.admin-subnav-link.active {
    color: var(--text-color);
    background: rgba(139, 69, 19, 0.25);
    border: 1px solid rgba(139, 69, 19, 0.4);
}

.admin-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}
.admin-stat-card.admin-stat-warn { border-color: rgba(217, 119, 6, 0.35); }
.admin-stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.admin-stat-value { font-size: 1.75rem; color: var(--text-color); }

.admin-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.admin-hub-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.admin-hub-card:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 69, 19, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.admin-hub-icon { font-size: 2rem; }
.admin-hub-card h2 { font-size: 1.15rem; color: var(--text-color); }
.admin-hub-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.admin-hub-cta { font-size: 0.8rem; font-weight: 700; color: var(--primary); }
.admin-hub-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(217, 119, 6, 0.2);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.admin-page-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
}
.admin-card-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; }

.admin-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}
.admin-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 150px;
}
.admin-field-narrow { flex: 0 0 100px; min-width: 100px; }
.admin-field label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.admin-field input,
.admin-field select {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.6rem;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    width: 100%;
}
.admin-status-box {
    flex: 2;
    min-width: 280px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 0.75rem;
    min-height: 45px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.admin-status-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.admin-status-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.8rem;
}
.admin-chip-meta { font-weight: 400; opacity: 0.7; }

.admin-btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #8b4513 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-weight: 700;
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    height: 40px;
    white-space: nowrap;
}
.admin-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.admin-btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; height: auto; }
.admin-btn-ghost {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.admin-link-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
}

.admin-log-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}
.admin-log-header { display: flex; justify-content: space-between; align-items: center; }
.admin-terminal {
    background: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem;
    height: 250px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.75rem;
    color: #38bdf8;
    white-space: pre-wrap;
    word-break: break-all;
}
.admin-success-link {
    text-align: center;
    background: rgba(46, 139, 87, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(46, 139, 87, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

.admin-section-title { font-size: 1rem; color: var(--accent); margin-bottom: 1rem; }
.admin-program-list { display: flex; flex-direction: column; gap: 0.75rem; }
.admin-program-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.admin-program-missing {
    background: rgba(217, 119, 6, 0.05);
    border-color: rgba(217, 119, 6, 0.2);
}
.admin-program-meta { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }
.admin-ready-section { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(0, 0, 0, 0.05); }
.admin-toggle-btn {
    background: none;
    border: none;
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-empty {
    text-align: center;
    padding: 2rem;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    color: var(--text-muted);
}

.admin-user-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}
.admin-feedback {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}
.admin-feedback.is-success { background: rgba(46, 139, 87, 0.15); color: var(--secondary); border: 1px solid rgba(46, 139, 87, 0.3); }
.admin-feedback.is-error { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: var(--primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(139, 69, 19, 0.1);
}
.admin-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.admin-table-empty { text-align: center; color: var(--text-muted); padding: 1.5rem !important; }
.admin-select-inline {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    color: var(--text-color);
    font-size: 0.8rem;
}
.admin-actions-cell { text-align: center; white-space: nowrap; }
.admin-icon-btn {
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid rgba(217, 119, 6, 0.3);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
}
.admin-icon-btn.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}
.admin-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.8rem;
    color: var(--text-muted);
}
.admin-pagination-btns { display: flex; gap: 0.5rem; align-items: center; }
.admin-pagination-btns button {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.admin-pagination-btns button:disabled { opacity: 0.4; cursor: not-allowed; }

.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}
.admin-modal-box {
    background: #1a1a2e;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    padding: 1.5rem;
    max-width: 380px;
    width: 90%;
}
.admin-modal-box h3 { color: var(--accent); margin-bottom: 0.75rem; }
.admin-modal-box input {
    width: 100%;
    margin: 1rem 0;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    box-sizing: border-box;
}
.admin-modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }

.admin-loading { color: #2563eb; }
.admin-error { color: #ef4444; }

/* Pulse Animation for Live Tracking */
.pulse-dot {
    width: 12px;
    height: 12px;
    background-color: #ef4444;
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #ef4444;
    border-radius: 50%;
    z-index: -1;
    animation: pulse-ring 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.5); opacity: 1; }
    80%, 100% { transform: scale(2.5); opacity: 0; }
}

.premium-dashboard-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 0.5rem 0.25rem 1.5rem 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
    animation: fadeIn 0.8s ease-out;
}

.premium-dashboard-grid::-webkit-scrollbar {
    height: 6px;
}

.premium-dashboard-grid::-webkit-scrollbar-track {
    background: transparent;
}

.premium-dashboard-grid::-webkit-scrollbar-thumb {
    background-color: var(--card-border);
    border-radius: 10px;
}

.premium-dashboard-grid > .card {
    flex: 0 0 350px;
    scroll-snap-align: start;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .premium-dashboard-grid {
        gap: 1rem;
        padding-bottom: 1rem;
        scrollbar-width: none;
    }
    .premium-dashboard-grid::-webkit-scrollbar {
        display: none;
    }
    .premium-dashboard-grid > .card {
        flex: 0 0 85% !important;
        scroll-snap-align: center !important;
    }
}

/* Green Pulse Animation */
.pulse-dot-green {
    width: 12px;
    height: 12px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
}

.pulse-dot-green::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #10b981;
    border-radius: 50%;
    z-index: -1;
    animation: pulse-ring-green 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring-green {
    0% { transform: scale(0.5); opacity: 1; }
    80%, 100% { transform: scale(2.5); opacity: 0; }
}

/* Mini Green Pulse for Tabs */
.pulse-dot-mini-green {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
}

.pulse-dot-mini-green::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #10b981;
    border-radius: 50%;
    z-index: 1;
    animation: pulse-ring-green 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

/* Amber Pulse Animation for Pending Results */
.pulse-dot-amber {
    width: 12px;
    height: 12px;
    background-color: #d97706;
    border-radius: 50%;
    position: relative;
}

.pulse-dot-amber::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #d97706;
    border-radius: 50%;
    z-index: -1;
    animation: pulse-ring-amber 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

/* Mini Amber Pulse for Tabs/Grids */
.pulse-dot-mini-amber {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #d97706;
    border-radius: 50%;
    position: relative;
}

.pulse-dot-mini-amber::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #d97706;
    border-radius: 50%;
    z-index: 1;
    animation: pulse-ring-amber 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring-amber {
    0% { transform: scale(0.5); opacity: 1; }
    80%, 100% { transform: scale(2.5); opacity: 0; }
}


/* Notification Badge Styles */
.notif-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-notif-badge {
    top: -2px;
    right: -2px;
    border: 1.5px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Notification Modal */
.notif-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 110000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notif-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.notif-modal {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.notif-modal-overlay.active .notif-modal {
    transform: translateY(0);
}

.notif-modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    filter: drop-shadow(0 5px 15px rgba(217, 119, 6, 0.3));
}

.notif-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.notif-modal-body {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.notif-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notif-btn-view {
    background: linear-gradient(135deg, var(--accent) 0%, #8b4513 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

.notif-btn-close {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Pull to Refresh Styling */
.ptr-element {
    height: 0;
    overflow: hidden;
    background: rgba(139, 69, 19, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: height 0.2s ease, opacity 0.2s ease;
    width: 100%;
    opacity: 0;
    gap: 0.5rem;
}

.ptr-icon {
    font-size: 1.5rem;
    transition: transform 0.2s ease;
}

.ptr-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ptr-spinning {
    animation: ptr-spin 0.8s linear infinite;
}

@keyframes ptr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
