@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

/* ==============================
   GLOBAL RESET & BASE
   ============================== */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

body {
    background: #f3f6f9;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px;
}

/* ==============================
   MAIN CONTAINER
   ============================== */
.container {
    width: 100%;
    max-width: 980px;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(13, 38, 63, 0.08);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

h2 {
    margin: 0 0 8px 0;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d8e0ea;
    font-size: 14px;
}

textarea {
    min-height: 80px;
}

/* ==============================
   TIMER SECTION
   ============================== */
.timer-box {
    border-radius: 10px;
    border: 1px dashed #dbe6f0;
    padding: 14px;
    text-align: center;
    background: #fbfdff;
}

#timerDisplay {
    font-size: 28px;
    font-weight: 700;
    color: #0b3d91;
    margin-bottom: 8px;
}

.btn-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

button {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

/* Timer Buttons */
#btnStart { background: #20b038; color: #fff; }
#btnPause { background: #ffb020; color: #111; }
#btnStop  { background: #dc3545; color: #fff; }
#btnFinish{ background: #2563eb; color: #fff; }

/* ==============================
   STATUS LABELS
   ============================== */
.status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 700;
}

.status.onprogress { background: #e6f4ea; color: #1b7a3a; }
.status.pause      { background: #fff4db; color: #b26a00; }
.status.stopped    { background: #ffecec; color: #a31515; }

/* ==============================
   TABLE
   ============================== */
.table-wrap {
    margin-top: 16px;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px 8px;
    border-bottom: 1px solid #eef3f8;
    text-align: left;
    font-size: 13px;
}

th {
    background: #fbfdff;
    position: sticky;
    top: 0;
}

/* ==============================
   EXPORT SECTION
   ============================== */
.export-section {
    margin-top: 12px;
    border-top: 1px solid #eef3f8;
    padding-top: 12px;
}

.export-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.export-form label {
    width: 100%;
}

/* ==============================
   LOGIN / LOGOUT
   ============================== */
.login-container {
    width: 100%;
    max-width: 380px;
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    margin: auto;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 22px;
    color: #0b3d91;
}

.login-container label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #02394f;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #0f868a;
}

.login-container p {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media(max-width: 768px) {
    body {
        padding: 12px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    table, th, td {
        font-size: 12px;
    }

    #timerDisplay {
        font-size: 22px;
    }

    button {
        flex: 1;
    }

    /* Centering labels & inputs on mobile */
    .grid label,
    .grid input,
    .grid select,
    .grid textarea,
    .login-container label,
    .login-container input,
    .login-container select {
        text-align: center;
    }

    .login-container {
        padding: 20px;
    }
}
