/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f0f2f5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Sidebar Navigation ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100%;
    background: #1e1e2d;
    color: #a2a3b7;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid #2e2e3d;
}

.sidebar-logo {
    display: block;
    width: 100%;
    height: auto;
}

.nav-menu {
    list-style: none;
    padding: 10px 0;
    flex: 1;
    overflow-y: auto;
}

.nav-menu li a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: #a2a3b7;
    transition: all 0.2s;
}

.nav-menu li a:hover {
    background: #2e2e3d;
    color: #fff;
}

.nav-menu li.active a {
    background: #3699ff;
    color: #fff;
    border-radius: 0;
}

.nav-badge {
    display: inline-block;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    padding: 3px 6px;
    border-radius: 10px;
    text-align: center;
    margin-left: 8px;
    vertical-align: middle;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #2e2e3d;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-name {
    color: #fff;
    font-weight: 500;
    font-size: 13px;
}

.btn-logout {
    color: #f44336;
    font-size: 13px;
    transition: opacity 0.2s;
}

.btn-logout:hover {
    opacity: 0.8;
}

/* ===== Content Area ===== */
.content-with-sidebar {
    margin-left: 220px;
    padding: 30px;
    min-height: 100%;
}

/* ===== Website Embed ===== */
.content-with-sidebar:has(.website-embed-container) {
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.website-embed-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.website-embed-frame {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
}

.content-full {
    padding: 0;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Notice Bar ===== */
.notice-bar {
    position: fixed;
    top: 0;
    left: 220px;
    right: 0;
    background: #3699ff;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    z-index: 200;
}

/* ===== Login Page ===== */
.login-page {
    background: url('hoardBackground.png') center center / cover no-repeat fixed;
}

.login-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    width: 380px;
    max-width: 90%;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 24px;
    color: #1e1e2d;
}

.login-container .subtitle {
    text-align: center;
    color: #999;
    margin-bottom: 30px;
    font-size: 13px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3699ff;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #3699ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2d8ae6;
}

.error-message {
    background: #fff3f3;
    color: #e74c3c;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
    text-align: center;
}

/* ===== Dashboard ===== */
.page-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e1e2d;
    margin-bottom: 25px;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.stat-card .label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 24px;
    font-weight: 600;
    color: #1e1e2d;
}

.stat-card.blue { border-left: 4px solid #3699ff; }
.stat-card.green { border-left: 4px solid #1bc5bd; }
.stat-card.orange { border-left: 4px solid #ffa800; }
.stat-card.red { border-left: 4px solid #f64e60; }

/* ===== Data Tables ===== */
.table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    overflow: hidden;
}

.table-header {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.table-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e1e2d;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 250px;
}

.search-input:focus {
    outline: none;
    border-color: #3699ff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.data-table td {
    padding: 12px 20px;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

.data-table tr:hover {
    background: #f8f9ff;
}

.data-table tr.clickable {
    cursor: pointer;
}

/* ===== Status Badges ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-active, .badge-Live { background: #d4edda; color: #155724; }
.badge-draft, .badge-Draft { background: #fff3cd; color: #856404; }
.badge-drawn, .badge-Drawn { background: #cce5ff; color: #004085; }
.badge-sold, .badge-Sold { background: #d1ecf1; color: #0c5460; }
.badge-won, .badge-Won { background: #d4edda; color: #155724; }
.badge-ended, .badge-Ended { background: #f8d7da; color: #721c24; }
.badge-default { background: #e2e3e5; color: #383d41; }

/* ===== Image Thumbnails ===== */
.thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    background: #eee;
}

/* ===== Loading Indicator ===== */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* ===== Connection Status Dot ===== */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.connected { background: #4caf50; }
.status-dot.disconnected { background: #f44336; }

/* ===== Hamburger Toggle (hidden on desktop) ===== */
.sidebar-toggle {
    display: none;
}

.sidebar-overlay {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {

    /* Sidebar slides in as drawer */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 200;
        width: 220px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 199;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .sidebar-overlay.open {
        opacity: 1;
        pointer-events: all;
    }

    /* Hamburger button */
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 198;
        width: 38px;
        height: 38px;
        background: #1e1e2d;
        color: #fff;
        border: none;
        border-radius: 6px;
        font-size: 18px;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    }

    /* Content fills full width, add top padding for the toggle button */
    .content-with-sidebar {
        margin-left: 0;
        padding: 16px;
        padding-top: 60px;
    }

    .notice-bar {
        left: 0;
    }

    /* Page title */
    .page-title {
        font-size: 18px;
        margin-bottom: 14px;
    }

    /* Stat cards — 2 columns */
    .stat-cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 14px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card .value {
        font-size: 18px;
    }

    /* Tab bar — two-row layout */
    .tab-bar {
        margin-bottom: 10px;
        border-radius: 8px;
        overflow: visible;
    }

    .tab-scroll {
        padding: 8px 8px 4px;
        gap: 6px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tab-scroll::-webkit-scrollbar {
        display: none;
    }

    /* Date tabs become pill buttons */
    .draw-tab {
        padding: 6px 12px;
        min-width: 0;
        border-bottom: none;
        border-radius: 20px;
        background: #f0f0f5;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .draw-tab.active {
        background: #3699ff;
        border-bottom: none;
    }

    .draw-tab.active .tab-label {
        color: #fff;
    }

    .draw-tab .tab-sub {
        font-size: 10px;
        color: #aaa;
    }

    .draw-tab.active .tab-sub {
        color: rgba(255,255,255,0.8);
    }

    .draw-tab .tab-label {
        font-size: 12px;
    }

    /* Special tabs go on their own second row */
    .tab-scroll-specials {
        display: flex;
        overflow-x: auto;
        padding: 0 8px 8px;
        gap: 6px;
        border-top: 1px solid #f0f0f0;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tab-scroll-specials::-webkit-scrollbar {
        display: none;
    }

    .tab-scroll-specials .draw-tab {
        background: #f5f5f5;
        font-size: 11px;
    }

    .tab-scroll-specials .draw-tab.active {
        background: #1e1e2d;
    }

    /* Date picker tab */
    .draw-tab.tab-datepicker {
        border-left: none;
        background: #f0f0f5;
    }

    .draw-tab.tab-datepicker.active {
        background: #3699ff;
    }

    .draw-tab.tab-datepicker #customDrawDate {
        max-width: 90px;
        font-size: 10px;
    }

    /* Filter bar — stack vertically, full width inputs */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
        margin-bottom: 10px;
    }

    .search-input {
        width: 100%;
        box-sizing: border-box;
    }

    .filter-group {
        flex-wrap: wrap;
    }

    /* Results count */
    .results-count {
        margin-bottom: 6px;
    }

    /* ===== Card view for data tables ===== */

    /* Hide the thead on mobile */
    .data-table thead {
        display: none;
    }

    /* Each row becomes a card */
    .data-table tr {
        display: block;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        margin-bottom: 10px;
        padding: 12px 14px;
        border-bottom: none;
    }

    .data-table tr:last-child {
        margin-bottom: 0;
    }

    /* Each cell becomes a labeled row within the card */
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
        border-bottom: 1px solid #f5f5f5;
        font-size: 13px;
    }

    .data-table td:last-child {
        border-bottom: none;
    }

    /* Hide cells with no label (image column) */
    .data-table td[data-label="Menu"] {
        justify-content: flex-start;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 4px;
    }

    /* Label pulled from data-label attribute */
    .data-table td[data-label]:not([data-label="Menu"])::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 600;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        flex-shrink: 0;
        margin-right: 10px;
    }

    /* Table container becomes transparent on mobile so cards show cleanly */
    .table-container {
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    /* Thumb image slightly larger in card view */
    .thumb {
        width: 48px;
        height: 48px;
    }
}

/* ===== Draw Date Tab Bar ===== */
.tab-bar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    margin-bottom: 15px;
    overflow: hidden;
}

.tab-scroll {
    display: flex;
    overflow-x: auto;
    gap: 0;
}

.draw-tab {
    flex: 0 0 auto;
    padding: 10px 16px;
    text-align: center;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    min-width: 90px;
    user-select: none;
}

.draw-tab:hover {
    background: #f0f4ff;
}

.draw-tab.active {
    border-bottom-color: #3699ff;
    background: #f0f4ff;
}

.draw-tab .tab-label {
    font-size: 12px;
    font-weight: 600;
    color: #1e1e2d;
    white-space: nowrap;
}

.draw-tab .tab-sub {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

.draw-tab.active .tab-label {
    color: #3699ff;
}

.draw-tab.tab-special {
    border-left: 1px solid #eee;
}

.draw-tab.tab-datepicker {
    border-left: 1px solid #eee;
}

.draw-tab.tab-datepicker #customDrawDate {
    font-size: 11px;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 4px;
    color: #555;
    background: #fafafa;
    cursor: pointer;
    max-width: 110px;
}

.draw-tab.tab-datepicker #customDrawDate:focus {
    outline: none;
    border-color: #3699ff;
}

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-checks {
    gap: 12px;
}

.check-label {
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.check-label input[type="checkbox"] {
    accent-color: #3699ff;
}

.th-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.th-sortable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ===== Results Count ===== */
.results-count {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
    padding-left: 4px;
}

/* ===== Listing Stats ===== */
.listing-stats {
    margin-bottom: 15px;
}

/* ===== Profit Colours ===== */
.profit-positive {
    color: #155724;
}

.profit-negative {
    color: #e74c3c;
}

/* ===== Badge additions ===== */
.badge-Closed { background: #f8d7da; color: #721c24; }
.badge-Complete { background: #d1ecf1; color: #0c5460; }
.badge-None { background: #e2e3e5; color: #383d41; }
.badge-Scheduled { background: #fff3cd; color: #856404; }

/* ===== Listing Detail Page ===== */
.ld-loading {
    text-align: center;
    padding: 80px 20px;
}

.ld-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: ld-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes ld-spin {
    to { transform: rotate(360deg); }
}

.ld-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ld-back {
    font-size: 13px;
    color: #3498db;
    white-space: nowrap;
}

.ld-back:hover {
    text-decoration: underline;
}

.ld-header .page-title {
    flex: 1;
    margin: 0;
    font-size: 22px;
}

.ld-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ld-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.ld-stats {
    margin-bottom: 15px;
}

/* Notices */
.ld-notices {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 15px;
}

.ld-notice-item {
    font-size: 13px;
    color: #856404;
    padding: 2px 0;
}

/* Tab bar */
.ld-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
    overflow-x: auto;
}

.ld-tab {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    color: #666;
    transition: color 0.15s, border-color 0.15s;
}

.ld-tab:hover {
    color: #333;
}

.ld-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

/* Tab panels */
.ld-tab-panel {
    display: none;
}

.ld-tab-panel.active {
    display: block;
}

/* Form grid */
.ld-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 900px) {
    .ld-form-grid { grid-template-columns: 1fr; }
}

.ld-form-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.ld-form-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.ld-field {
    margin-bottom: 12px;
}

.ld-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
}

.ld-field input[type="text"],
.ld-field input[type="number"],
.ld-field input[type="datetime-local"],
.ld-field textarea,
.ld-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
}

.ld-field textarea {
    resize: vertical;
}

.ld-field input:focus,
.ld-field textarea:focus,
.ld-field select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}

.ld-field-row {
    display: flex;
    gap: 15px;
}

.ld-field-row .ld-field {
    flex: 1;
}

.ld-check-label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 13px !important;
    cursor: pointer;
}

.ld-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* Gallery */
.ld-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.ld-gallery-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #fafafa;
}

.ld-gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.ld-gallery-pos {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
}

/* Prizes */
.ld-prize-list {
    margin-bottom: 20px;
}

.ld-prize-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.ld-prize-item:hover {
    border-color: #3498db;
}

.ld-prize-item.selected {
    border-color: #3498db;
    background: #eaf4fd;
}

.ld-prize-name {
    flex: 1;
    font-weight: 500;
}

.ld-prize-cost {
    font-size: 13px;
    color: #666;
}

.ld-prize-detail {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.ld-prize-detail h4 {
    font-size: 16px;
    margin-bottom: 15px;
}

.ld-prize-actions {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Winner */
.ld-winner-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 15px;
}

.ld-winner-info .ld-field label {
    color: #166534;
}

.ld-muted {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.ld-pre-wrap {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 12px;
    background: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #ccc;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.ld-button-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* Clickable table rows */
tr.clickable {
    cursor: pointer;
}

tr.clickable:hover {
    background: #eaf4fd !important;
}

/* ===== Instant Win Detail Page ===== */
.iwd-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.iwd-header .page-title {
    margin: 0;
    flex: 1;
}

.iwd-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iwd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 700px) {
    .iwd-grid { grid-template-columns: 1fr; }
}

.iwd-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 24px;
}

.iwd-section h3 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.iwd-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

.iwd-row:last-child {
    border-bottom: none;
}

.iwd-label {
    color: #999;
    font-size: 12px;
    min-width: 90px;
    flex-shrink: 0;
}

.iwd-value {
    color: #222;
    font-weight: 500;
    word-break: break-word;
}

.iwd-value a {
    color: #3498db;
    text-decoration: none;
}

.iwd-value a:hover {
    text-decoration: underline;
}

.iwd-prize-name {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
}

.iwd-prize-cost {
    font-size: 18px;
    font-weight: 600;
    color: #27ae60;
    margin-bottom: 16px;
}

.iwd-status-block {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.iwd-status-text {
    font-size: 15px;
    font-weight: 600;
    color: #555;
}

.iwd-status-info {
    font-size: 13px;
    color: #888;
}

/* Action buttons section */
.iwd-actions {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.iwd-actions h3 {
    margin: 0 0 14px 0;
    font-size: 14px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.iwd-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Confirm panel */
.iwd-panel {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 24px;
}

.iwd-panel h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #7b5800;
    font-weight: 700;
}

.iwd-panel-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.iwd-panel label {
    font-size: 13px;
    color: #7b5800;
    min-width: 80px;
}

.iwd-panel input[type="text"],
.iwd-panel input[type="number"] {
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    width: 120px;
    background: #fffde7;
}

.iwd-panel .iwd-alt-total {
    font-size: 15px;
    font-weight: 700;
    color: #27ae60;
    margin: 8px 0 12px 0;
}

.iwd-panel-buttons {
    display: flex;
    gap: 8px;
}

/* Alt panel */
.iwd-alt-panel {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
}

.iwd-alt-panel h4 {
    color: #1b5e20;
}

.iwd-alt-panel label {
    color: #2e7d32;
}

.iwd-alt-panel input[type="text"],
.iwd-alt-panel input[type="number"] {
    border-color: #a5d6a7;
    background: #f1f8e9;
}

.iwd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
    color: #888;
}

.iwd-listing-pic {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
