* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6f8;
    color: #202124;
}

.topbar {
    background: #202124;
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 22px;
    font-weight: 700;
}

.topbar a {
    color: white;
    margin-left: 16px;
    text-decoration: none;
}

.container {
    max-width: 1050px;
    margin: 32px auto;
    padding: 0 16px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

.auth-card {
    max-width: 480px;
    margin: 40px auto;
}

h1, h2 {
    margin-top: 0;
}

label {
    display: block;
    font-weight: 700;
    margin-top: 14px;
}

input, select {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid #c8cdd2;
    border-radius: 8px;
    font-size: 16px;
}

button, .button {
    display: inline-block;
    margin-top: 18px;
    background: #1f5eff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.button.secondary {
    background: #4b5563;
}

.error {
    background: #ffe2e2;
    color: #8a1f1f;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.success {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.tracker-list {
    width: 100%;
    border-collapse: collapse;
}

.tracker-list th,
.tracker-list td {
    border-bottom: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.footer {
    text-align: center;
    color: #666;
    padding: 24px;
}

@media (max-width: 760px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.wide-card {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

fieldset {
    border: 1px solid #d6d9dd;
    border-radius: 12px;
    padding: 18px;
    background: #fbfcfd;
}

legend {
    font-weight: 700;
    padding: 0 8px;
}

textarea {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid #c8cdd2;
    border-radius: 8px;
    font-size: 16px;
    font-family: Arial, Helvetica, sans-serif;
}

.full-width {
    grid-column: 1 / -1;
}

.required {
    color: #b91c1c;
}

.muted {
    color: #5f6368;
}

.mix-row {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 12px;
    align-items: center;
    margin: 10px 0;
}

.check-label {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 0;
}

.check-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

@media (max-width: 760px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .mix-row {
        grid-template-columns: 1fr;
    }
}

textarea {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid #c8cdd2;
    border-radius: 8px;
    font-size: 16px;
    font-family: Arial, Helvetica, sans-serif;
}

fieldset {
    border: 1px solid #d9dde3;
    border-radius: 10px;
    padding: 18px;
    margin: 0 0 18px 0;
}

legend {
    font-weight: 700;
    padding: 0 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.full-width {
    grid-column: 1 / -1;
}

.wide-card {
    max-width: 1100px;
}

.muted {
    color: #5f6368;
}

.required {
    color: #b91c1c;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mix-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-top: 0;
}

.check-label input {
    width: auto;
    margin-top: 0;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.small-button {
    margin-top: 0;
    padding: 6px 10px;
    font-size: 14px;
}

.danger-button {
    background: #b91c1c;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-form select {
    width: auto;
    min-width: 110px;
}

@media (max-width: 760px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .mix-row {
        grid-template-columns: 1fr;
    }
    .form-actions, .action-row, .inline-form {
        flex-direction: column;
        align-items: stretch;
    }
}


/* ============================================================
   VERSION 8 TRACKER DASHBOARD LAYOUT
============================================================ */

.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tracker-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.summary-card h3 {
    margin-top: 0;
    margin-bottom: 18px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #ececec;
}

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

.summary-label {
    font-weight: 700;
    color: #555;
}

.summary-value {
    text-align: right;
}

.progress-wrap {
    margin-top: 20px;
}

.progress-label {
    margin-bottom: 8px;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 18px;
    background: #dfe5eb;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1f5eff;
}

.compact-table th,
.compact-table td {
    padding: 8px;
}


/* ============================================================
   VERSION 10 DELETE TRACKER BUTTONS
============================================================ */

.danger-button,
button.danger-button {
    background: #b91c1c;
}

.danger-button:hover,
button.danger-button:hover {
    background: #991b1b;
}

.danger-link {
    background: #b91c1c;
}

.danger-link:hover {
    background: #991b1b;
}


/* ============================================================
   VERSION 11 SAMPLE PLAN + DAILY PRODUCTION
============================================================ */

.sample-warning td {
    background: #fff7cc;
}

.sample-due td {
    background: #ffe2e2;
    color: #8a1f1f;
    font-weight: 700;
}

.sample-complete td {
    background: #dcfce7;
}

.big-number {
    font-size: 28px;
    font-weight: 700;
    margin: 10px 0 0;
}


/* ============================================================
   VERSION 15 WORKFLOW POLISH
============================================================ */

.tracker-sample-alert,
.sample-warning-banner {
    background: #fff7cc;
    border: 1px solid #eab308;
    color: #713f12;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.tracker-sample-alert.alert-danger {
    background: #ffe2e2;
    border-color: #b91c1c;
    color: #8a1f1f;
}

.tracker-sample-alert a {
    font-weight: 700;
}


/* ============================================================
   VERSION 23 HELP + REGISTRATION UPDATE
============================================================ */

.password-requirements {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    font-size: 14px;
}

.password-requirements ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.card ol,
.card ul {
    line-height: 1.6;
}


/* ============================================================
   VERSION 24 MOBILE / TABLET RESPONSIVE OPTIMIZATION
============================================================ */

html {
    -webkit-text-size-adjust: 100%;
}

img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

input,
select,
textarea,
button,
.button {
    max-width: 100%;
}

.tracker-list {
    min-width: 640px;
}

.card,
.summary-card {
    overflow-x: auto;
}

@media (max-width: 900px) {
    .container {
        margin: 20px auto;
        padding: 0 12px;
    }

    .dashboard-grid,
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tracker-header {
        flex-direction: column;
        align-items: stretch;
    }

    .tracker-actions,
    .action-row,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .tracker-actions .button,
    .action-row .button,
    .form-actions .button,
    .form-actions button,
    button,
    .button {
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }

    .form-grid {
        display: block;
    }

    fieldset {
        margin-bottom: 16px;
    }

    .summary-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .summary-value {
        text-align: left;
    }
}

@media (max-width: 700px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    .topbar nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .topbar a {
        margin-left: 0;
        padding: 8px 0;
    }

    .brand {
        font-size: 20px;
    }

    .auth-card {
        max-width: 100%;
        margin: 20px auto;
    }

    .card,
    .summary-card {
        padding: 18px;
        border-radius: 10px;
    }

    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 21px;
    }

    h3 {
        font-size: 18px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .tracker-list {
        font-size: 14px;
    }

    .password-requirements {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 14px auto;
        padding: 0 10px;
    }

    .card,
    .summary-card {
        padding: 14px;
    }

    h1 {
        font-size: 23px;
    }

    .big-number {
        font-size: 23px;
    }

    label {
        margin-top: 12px;
    }

    input,
    select,
    textarea,
    button,
    .button {
        padding: 10px;
    }

    .tracker-list th,
    .tracker-list td {
        padding: 8px;
    }
}
