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

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* Visually hidden — accessible to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-box {
    width: 360px;
    margin: 120px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.login-box h2 {
    margin-bottom: 24px;
    font-size: 28px;
    color: #2c3e50;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover {
    background: #3d5166;
}

.error {
    color: red;
    margin-bottom: 14px;
    font-size: 14px;
}

/* ============================================================
   DASHBOARD
   ============================================================ */

.dashboard {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

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

.dashboard header h1 {
    font-size: 26px;
    color: #2c3e50;
}

.dashboard header a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.15s;
}

.dashboard header a:hover {
    background: rgba(0,0,0,0.06);
    color: #2c3e50;
}

/* ============================================================
   UPLOAD BOX
   ============================================================ */

.upload-box {
    background: white;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.upload-box h3 {
    margin-bottom: 16px;
    color: #2c3e50;
}

.upload-box input[type="file"] {
    margin-bottom: 12px;
    font-size: 14px;
}

.upload-box button {
    padding: 10px 24px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.upload-box button:hover {
    background: #3d5166;
}

/* ============================================================
   FILE LIST
   ============================================================ */

.file-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.file-list h3 {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    color: #2c3e50;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid #f5f5f5;
}

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

.file-item span {
    font-size: 14px;
    color: #555;
}

.file-actions a {
    text-decoration: none;
    font-size: 13px;
    margin-left: 16px;
    color: #2c3e50;
}

.file-actions a:hover {
    text-decoration: underline;
}

.file-actions a.delete {
    color: #e74c3c;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ============================================================
   TILES — Desktop: 3-column grid
   ============================================================ */

.tile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.tile {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 28px 28px;
    min-height: 120px;
    text-align: left;
    text-decoration: none;
    color: #2c3e50;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    border-left: 4px solid transparent;
}

.tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* Tile accent colors */
.tile--docs     { border-left-color: #f39c12; }
.tile--tracker  { border-left-color: #3498db; }
.tile--cards    { border-left-color: #9b59b6; }
.tile--betting  { border-left-color: #e67e22; }
.tile--debt     { border-left-color: #27ae60; }
.tile--calendar { border-left-color: #1abc9c; }
.tile--golf     { border-left-color: #2ecc71; }
.tile--ledger   { border-left-color: #5b9bd5; }
.tile--food     { border-left-color: #e67e22; }

.tile-icon {
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    overflow: hidden;
    flex-shrink: 0;
}

.tile-img {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.tile-label {
    font-size: 16px;
    font-weight: 600;
}

/* ============================================================
   SHARED BADGE — used in cards and betting
   ============================================================ */

.section-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ============================================================
   DELETE CONFIRMATION MODAL
   ============================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 340px;
    width: 90%;
}

.modal-box p {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.delete-confirm-btn {
    padding: 10px 24px;
    background: #e74c3c;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.delete-confirm-btn:hover {
    background: #c0392b;
}

/* ============================================================
   LOGOUT WARNING TOAST
   ============================================================ */

#logout-toast {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a2e;
    border: 1px solid #e67e22;
    border-left: 4px solid #e67e22;
    border-radius: 10px;
    padding: 14px 16px;
    min-width: 300px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    transition: bottom 0.35s ease;
    z-index: 9999;
}

#logout-toast.logout-toast--visible {
    bottom: 24px;
}

.logout-toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.logout-toast-body {
    flex: 1;
}

.logout-toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #f0f0f0;
}

.logout-toast-msg {
    font-size: 13px;
    color: #aaa;
    margin-top: 2px;
}

.logout-toast-msg strong {
    color: #e67e22;
    font-size: 15px;
}

.logout-toast-btn {
    background: #e67e22;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.logout-toast-btn:hover {
    background: #cf6d17;
}

/* ============================================================
   DESKTOP — Global
   ============================================================ */

@media (min-width: 769px) {

    .docs-wrap .upload-box,
    .docs-wrap .file-list {
        max-width: 700px;
    }

}

/* ============================================================
   MOBILE — Global
   ============================================================ */

@media (max-width: 768px) {

    .dashboard {
        margin: 20px auto;
        padding: 0 14px;
    }

    /* Tiles — Mobile: 2-column grid */
    .tile-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .tile {
        padding: 20px 16px;
        min-height: 100px;
        gap: 12px;
        border-left-width: 4px;
    }

    .tile-icon {
        font-size: 24px;
        min-width: 28px;
        max-width: 28px;
        height: 28px;
    }

    .tile-img {
        width: 28px;
        height: 28px;
        max-width: 28px;
        max-height: 28px;
    }

    .tile-label {
        font-size: 14px;
    }

}
