/* MyDailyWin Admin Styles */
/* Extends shared.css — variables and reset defined there */

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: linear-gradient(135deg, #3a8f00, var(--primary-dark), var(--primary));
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(58, 143, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.top-bar::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    font-size: 34px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.top-bar-title {
    text-align: left;
}

.top-bar h1 {
    font-size: 21px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.3px;
}

.top-bar p {
    opacity: 0.85;
    font-size: 13px;
    margin: 2px 0 0 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.top-bar-links {
    display: flex;
    gap: 8px;
}

.top-bar-links a {
    background: rgba(255,255,255,0.18);
    color: white;
    padding: 9px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.12);
}

.top-bar-links a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* User Name */
.user-name {
    display: inline;
    margin: 0;
    padding: 0;
}

/* ===== CONTAINER & CARDS ===== */
.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-box);
    padding: 26px;
    margin-bottom: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
}

.card h2 {
    font-size: 19px;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.2px;
}

.card h2 .user-name {
    display: inline;
}

.card h3 {
    font-size: 15px;
    margin: 20px 0 12px 0;
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 13px 24px;
    text-align: center;
    font-weight: 700;
    border-radius: var(--radius-btn);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.2s;
    letter-spacing: -0.1px;
}

.btn-block { display: block; width: 100%; margin-bottom: 10px; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(88, 167, 0, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #3a8f00);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(88, 167, 0, 0.4);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1.5px solid #e0e2e6;
}
.btn-secondary:hover {
    background: #eef0f3;
    border-color: #cdd0d5;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

.btn-purple {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-shade));
    color: white;
    box-shadow: 0 2px 8px rgba(43, 112, 201, 0.3);
}
.btn-purple:hover {
    background: linear-gradient(135deg, var(--secondary-shade), #123d73);
    transform: translateY(-1px);
}

.btn-orange {
    background: linear-gradient(135deg, var(--orange), #ea580c);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 150, 0, 0.3);
}
.btn-orange:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 9px 18px;
    font-size: 13px;
    border-radius: 12px;
}

/* ===== STATS GRID ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-box {
    background: var(--bg);
    padding: 18px 14px;
    border-radius: 16px;
    text-align: center;
    border: 1.5px solid transparent;
    transition: all 0.2s;
}

.stat-box:hover {
    border-color: rgba(88, 204, 2, 0.2);
    transform: translateY(-1px);
}

.stat-box .value {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.stat-box .label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
    font-weight: 600;
}

.stat-box.highlight {
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.08), rgba(88, 204, 2, 0.18));
    border: 2px solid var(--primary);
    box-shadow: 0 2px 12px rgba(88, 204, 2, 0.15);
}

.stat-box.highlight .value {
    font-size: 32px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    background: var(--card-bg);
    padding: 6px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
    scrollbar-width: thin;
}

.tab {
    flex-shrink: 0;
    padding: 10px 16px;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    border: none;
    color: var(--text-light);
    transition: all 0.2s;
    min-height: 44px;
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: -0.1px;
}

.tab:hover {
    background: var(--bg);
    color: var(--text);
}

.tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(88, 167, 0, 0.3);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

th, td {
    padding: 12px 12px;
    text-align: left;
    border-bottom: 1px solid #eef0f3;
}

th {
    background: transparent;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
    padding-bottom: 10px;
}

td {
    font-size: 14px;
}

.task-name-cell { font-weight: 700; color: var(--text); }
.points-cell {
    color: var(--primary);
    font-weight: 800;
    font-size: 15px;
}
.dollar-cell { color: var(--text-light); font-weight: 600; }
.editable-row { cursor: pointer; transition: all 0.15s; border-radius: 10px; }
.editable-row:hover { background: rgba(88, 204, 2, 0.06); }
.editable-row td:first-child { border-radius: 10px 0 0 10px; }
.editable-row td:last-child { border-radius: 0 10px 10px 0; }

/* ===== LEVEL ROWS ===== */
.level-row {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 8px;
    background: var(--bg);
    transition: all 0.2s;
    border: 1.5px solid transparent;
}

.level-row:hover {
    border-color: rgba(88, 204, 2, 0.15);
}

.level-row.current {
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.1), rgba(88, 204, 2, 0.2));
    border: 2px solid var(--primary);
    box-shadow: 0 2px 12px rgba(88, 204, 2, 0.15);
}

.level-row.locked { opacity: 0.35; }
.level-name { flex: 1; font-weight: 700; }
.level-pts { font-size: 14px; color: var(--text-light); font-weight: 600; }

/* ===== INFO & WARNING BOXES ===== */
.info-box {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-left: 4px solid var(--primary);
    padding: 16px 18px;
    border-radius: 0 14px 14px 0;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.warning-box {
    background: linear-gradient(135deg, #fefce8, #fef3c7);
    border-left: 4px solid #eab308;
    padding: 16px 18px;
    border-radius: 0 14px 14px 0;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

/* ===== REPORT ITEMS ===== */
.report-item {
    background: linear-gradient(135deg, #fef2f2, #fecaca33);
    border-left: 4px solid #ef4444;
    padding: 16px 18px;
    border-radius: 0 14px 14px 0;
    margin-bottom: 10px;
}

.report-item .task-name { font-weight: 800; margin-bottom: 4px; }
.report-item .reason { font-size: 14px; color: var(--text-light); }
.report-item .date { font-size: 13px; color: var(--text-light); margin-top: 6px; font-weight: 600; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 15px;
    font-weight: 600;
    background: var(--bg);
    border-radius: 16px;
    border: 2px dashed #e0e2e6;
}

/* ===== FEATURE ITEMS ===== */
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #eef0f3;
}

.feature-item:last-child { border-bottom: none; }
.feature-icon { font-size: 26px; }
.feature-content h4 { font-weight: 800; margin-bottom: 4px; }
.feature-content p { font-size: 14px; color: var(--text-light); line-height: 1.5; }

/* ===== PAYMENT ROWS ===== */
.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: var(--bg);
    border-radius: 14px;
    margin-bottom: 10px;
    transition: all 0.2s;
    border: 1.5px solid transparent;
}

.payment-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.payment-row.paid {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-left: 4px solid var(--primary);
}
.payment-row.pending {
    background: linear-gradient(135deg, #fefce8, #fef3c7);
    border-left: 4px solid #eab308;
}
.payment-amount {
    font-weight: 800;
    font-size: 20px;
    color: var(--primary);
    letter-spacing: -0.3px;
}

/* ===== FORM INPUTS ===== */
input[type="text"], input[type="number"], input[type="email"], select, textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    margin-bottom: 12px;
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.12);
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active { display: flex; }

.modal-box {
    background: var(--card-bg);
    border-radius: var(--radius-box);
    padding: 32px;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    animation: modalSlideUp 0.25s ease-out;
}

@supports (height: 100dvh) {
    .modal-box { max-height: calc(100dvh - 40px); }
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-box h2 {
    margin-bottom: 20px;
    font-weight: 800;
}

.close-modal {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 10px;
    font-size: 28px;
    float: right;
    color: var(--text-light);
    transition: color 0.15s;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text);
}

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid #eef0f3;
    padding: 18px 0;
}

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

.faq-q {
    font-weight: 800;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 15px;
    color: var(--text);
}

.faq-a {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== LINKS ===== */
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.back-link:hover { text-decoration: underline; }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-purple { background: #f3e8ff; color: #9333ea; }

/* ===== Admin Guide Page ===== */
.hero {
    background: linear-gradient(135deg, #3a8f00, var(--primary-dark), var(--primary));
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 800;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

.section {
    background: var(--card-bg);
    border-radius: var(--radius-box);
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
}

.section h2 {
    font-size: 24px;
    color: var(--primary-shade);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.section h3 {
    font-size: 18px;
    margin: 20px 0 10px;
    color: var(--text);
}

.section p, .section li {
    color: var(--text-light);
    margin-bottom: 10px;
}

.section ul {
    padding-left: 20px;
}

.highlight-box {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-radius: var(--radius-btn);
    padding: 20px;
    margin: 20px 0;
}

.highlight-box h4 {
    color: var(--primary-shade);
    margin-bottom: 10px;
}

.cta {
    text-align: center;
    padding: 40px 20px;
}

footer {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    font-size: 14px;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ===== RESPONSIVE: Tablet (max-width: 1024px) ===== */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 16px;
    }

    .tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .card {
        padding: 22px;
    }

    .card h2 {
        font-size: 18px;
    }

    .stat-box .value {
        font-size: 26px;
    }

    .modal-box {
        max-width: 90%;
        padding: 24px;
    }
}

/* ===== RESPONSIVE: Mobile (max-width: 768px) ===== */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
        text-align: center;
    }

    .top-bar::after { display: none; }

    .top-bar-left {
        justify-content: center;
    }

    .top-bar h1 {
        font-size: 18px;
    }

    .top-bar p {
        font-size: 13px;
    }

    .top-bar-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .top-bar-links a {
        font-size: 13px;
        padding: 7px 14px;
        white-space: normal;
    }

    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding: 5px;
        gap: 3px;
        scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab {
        flex-shrink: 0;
        padding: 10px 12px;
        font-size: 13px;
        min-height: 44px;
        white-space: nowrap;
    }

    .container {
        padding: 12px;
    }

    .card {
        padding: 18px;
        border-radius: 16px;
        margin-bottom: 14px;
    }

    .card h2 {
        font-size: 17px;
        margin-bottom: 12px;
    }

    .card h3 {
        font-size: 12px;
        margin: 16px 0 10px 0;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-box {
        padding: 14px 10px;
        border-radius: 14px;
    }

    .stat-box .value {
        font-size: 22px;
    }

    .stat-box .label {
        font-size: 13px;
    }

    .stat-box.highlight .value {
        font-size: 24px;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    th, td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .btn {
        padding: 12px 18px;
        font-size: 15px;
    }

    .btn-sm {
        padding: 8px 14px;
        font-size: 13px;
    }

    input[type="text"], input[type="number"], input[type="email"], select, textarea {
        padding: 11px 14px;
        font-size: 15px;
    }

    .payment-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px;
    }

    .payment-amount {
        font-size: 18px;
    }

    .level-row {
        padding: 12px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .level-pts {
        font-size: 13px;
    }

    .info-box, .warning-box, .report-item {
        padding: 14px;
        font-size: 13px;
    }

    .feature-item {
        gap: 10px;
        padding: 12px 0;
    }

    .feature-icon {
        font-size: 22px;
    }

    .feature-content p {
        font-size: 14px;
    }

    .modal {
        padding: 12px;
    }

    .modal-box {
        max-width: 100%;
        padding: 24px;
        border-radius: 20px;
        max-height: 85vh;
    }

    .faq-item {
        padding: 14px 0;
    }

    .faq-q {
        font-size: 15px;
    }

    .faq-a {
        font-size: 13px;
    }

    .badge {
        font-size: 13px;
        padding: 3px 10px;
    }

    .empty-state {
        padding: 28px 16px;
        font-size: 14px;
    }
}

/* ===== RESPONSIVE: Small phone (max-width: 375px) ===== */
@media (max-width: 375px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-box .value {
        font-size: 20px;
    }

    .top-bar-links {
        flex-direction: column;
        align-items: center;
    }

    .tab {
        font-size: 13px;
        padding: 8px 10px;
    }

    .card {
        padding: 14px;
    }

    .card h2 {
        font-size: 16px;
    }
}

/* ===== ACTIVITY LOG ===== */
.activity-entry {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 12px;
    background: var(--card);
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.activity-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #22c55e;
    border-radius: 4px 0 0 4px;
}

.activity-entry:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.activity-task {
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.activity-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    color: white;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.activity-badge-daily {
    background: #22c55e;
}

.activity-badge-weekly {
    background: #8b5cf6;
}

.activity-badge-login {
    background: #f59e0b;
}

.activity-badge-spin {
    background: #ec4899;
}

.activity-badge-bonus {
    background: #3b82f6;
}

.activity-date {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.activity-comment {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.5;
    background: var(--bg);
    padding: 10px 14px;
    border-radius: 10px;
}

.activity-photo {
    max-width: min(200px, 100%);
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
    display: block;
}

.activity-photo:hover {
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
