/* =========================================================
   MyPeaceland.com - Peaceland Time Clock
   Site-wide styles (mobile-first)
   ========================================================= */

:root {
    --pl-green-900: #0b3d2e;
    --pl-green-700: #145c45;
    --pl-green-500: #1f8a63;
    --pl-green-100: #e4f3ec;
    --pl-gold: #d4a62a;
    --pl-red: #b23a3a;
    --pl-ink: #1c2321;
    --pl-muted: #6b7570;
    --pl-line: #e2e8e5;
    --pl-bg: #f5f7f6;
    --pl-card: #ffffff;
    --pl-radius: 14px;
    --pl-shadow: 0 6px 24px rgba(11, 61, 46, 0.08);
}

html, body {
    height: 100%;
}

html {
    background: var(--pl-bg);
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--pl-ink);
    background: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

form {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ---------- Clock watermarks ---------- */
/* One clock-face SVG, reused at different sizes/positions at very low opacity. */
.bg-clocks {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%230b3d2e' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='46'/%3E%3Ccircle cx='50' cy='50' r='40' stroke-width='0.6'/%3E%3Cpath d='M50 8v6M92 50h-6M50 92v-6M8 50h6M71 13.6l-3 5.2M86.4 29l-5.2 3M86.4 71l-5.2-3M71 86.4l-3-5.2M29 86.4l3-5.2M13.6 71l5.2-3M13.6 29l5.2 3M29 13.6l3 5.2'/%3E%3Cpath d='M50 50V24M50 50l18 11' stroke-width='2.4'/%3E%3Ccircle cx='50' cy='50' r='2' fill='%230b3d2e'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%230b3d2e' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='46'/%3E%3Ccircle cx='50' cy='50' r='40' stroke-width='0.6'/%3E%3Cpath d='M50 8v6M92 50h-6M50 92v-6M8 50h6M71 13.6l-3 5.2M86.4 29l-5.2 3M86.4 71l-5.2-3M71 86.4l-3-5.2M29 86.4l3-5.2M13.6 71l5.2-3M13.6 29l5.2 3M29 13.6l3 5.2'/%3E%3Cpath d='M50 50V24M50 50l-12 16' stroke-width='2.4'/%3E%3Ccircle cx='50' cy='50' r='2' fill='%230b3d2e'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-size: 520px 520px, 300px 300px;
    background-position: right -140px top 120px, left -90px bottom -60px;
    opacity: 0.06;
}

/* White clock inside the dark hero */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    right: -120px;
    top: -80px;
    width: 460px;
    height: 460px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23ffffff' stroke-width='1.4' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='46'/%3E%3Ccircle cx='50' cy='50' r='40' stroke-width='0.6'/%3E%3Cpath d='M50 8v6M92 50h-6M50 92v-6M8 50h6M71 13.6l-3 5.2M86.4 29l-5.2 3M86.4 71l-5.2-3M71 86.4l-3-5.2M29 86.4l3-5.2M13.6 71l5.2-3M13.6 29l5.2 3M29 13.6l3 5.2'/%3E%3Cpath d='M50 50V22M50 50l20 8' stroke-width='2.4'/%3E%3Ccircle cx='50' cy='50' r='2' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.10;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

@media (max-width: 767.98px) {
    .bg-clocks {
        background-size: 360px 360px, 220px 220px;
        background-position: right -120px top 90px, left -80px bottom -40px;
    }
    .hero::before {
        width: 300px;
        height: 300px;
        right: -110px;
        top: -60px;
    }
}

.site-main {
    flex: 1 0 auto;
}

/* ---------- Header / nav ---------- */
.site-header {
    background: linear-gradient(135deg, var(--pl-green-900), var(--pl-green-700));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 1.15rem;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.14);
    margin-right: 10px;
    color: var(--pl-gold);
}

.navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--pl-green-900);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    padding: 1.25rem 0;
    margin-top: 3rem;
}

.text-muted-light {
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Hero (home page) ---------- */
.hero {
    background: radial-gradient(1200px 400px at 10% -10%, rgba(212, 166, 42, 0.18), transparent 60%),
                linear-gradient(160deg, var(--pl-green-900) 0%, var(--pl-green-700) 100%);
    color: #fff;
    padding: 3.5rem 0 4rem;
}

.hero h1 {
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.15;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.85);
    max-width: 640px;
}

.hero .btn-light {
    font-weight: 600;
}

.hero .btn-outline-light {
    font-weight: 600;
}

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pl-gold);
    margin-bottom: 0.75rem;
}

/* ---------- Cards / features ---------- */
.feature-card {
    background: var(--pl-card);
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-radius);
    padding: 1.5rem;
    height: 100%;
    box-shadow: var(--pl-shadow);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--pl-green-100);
    color: var(--pl-green-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.section-title {
    font-weight: 700;
    font-size: 1.5rem;
}

.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 0;
}

.steps li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.1rem;
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--pl-green-700);
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Time clock page ---------- */
.clock-wrap {
    max-width: 520px;
    margin: 0 auto;
}

.clock-card {
    background: var(--pl-card);
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-radius);
    box-shadow: var(--pl-shadow);
    padding: 1.5rem;
}

.clock-time {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--pl-green-900);
    line-height: 1.1;
}

.clock-date {
    color: var(--pl-muted);
    font-size: 0.95rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control-lg {
    font-size: 1.05rem;
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
}

.form-control:focus {
    border-color: var(--pl-green-500);
    box-shadow: 0 0 0 0.2rem rgba(31, 138, 99, 0.2);
}

.btn-punch {
    width: 100%;
    padding: 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    transition: transform 0.08s ease, filter 0.15s ease;
}

.btn-punch:active {
    transform: scale(0.98);
}

.btn-clock-in {
    --bs-btn-bg: var(--pl-green-500);
    --bs-btn-border-color: var(--pl-green-500);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--pl-green-700);
    --bs-btn-hover-border-color: var(--pl-green-700);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--pl-green-900);
    --bs-btn-active-border-color: var(--pl-green-900);
    --bs-btn-active-color: #fff;
    --bs-btn-focus-shadow-rgb: 31, 138, 99;
}

.btn-clock-out {
    --bs-btn-bg: var(--pl-red);
    --bs-btn-border-color: var(--pl-red);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #932f2f;
    --bs-btn-hover-border-color: #932f2f;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #7a2626;
    --bs-btn-active-border-color: #7a2626;
    --bs-btn-active-color: #fff;
    --bs-btn-focus-shadow-rgb: 178, 58, 58;
}

.ip-label {
    font-size: 0.8rem;
    color: var(--pl-muted);
    text-align: center;
    margin-top: 1.25rem;
}

.ip-label code {
    color: var(--pl-green-700);
    background: var(--pl-green-100);
    padding: 2px 6px;
    border-radius: 6px;
}

.validation-msg {
    color: var(--pl-red);
    font-size: 0.85rem;
    margin-top: 0.3rem;
    display: block;
}

.status-alert {
    border-radius: 12px;
}

/* ---------- Admin page ---------- */
.admin-toolbar {
    background: var(--pl-card);
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--pl-shadow);
}

.summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--pl-green-100);
    color: var(--pl-green-900);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-working {
    background: var(--pl-green-500);
}

.badge-done {
    background: #5b6770;
}

.table-card {
    background: var(--pl-card);
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-radius);
    box-shadow: var(--pl-shadow);
    overflow: hidden;
}

.responsive-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.responsive-table thead th {
    background: var(--pl-green-900);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.responsive-table tbody td {
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--pl-line);
    vertical-align: middle;
}

.responsive-table tbody tr:nth-child(even) {
    background: #fafcfb;
}

.employee-name {
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--pl-muted);
}

/* ---------- Mobile: table -> stacked cards ---------- */
@media (max-width: 767.98px) {
    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        border-top: 1px solid var(--pl-line);
        padding: 0.75rem 1rem;
        background: #fff !important;
    }

    .responsive-table tr:first-child {
        border-top: none;
    }

    .responsive-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        border: none;
        padding: 0.35rem 0;
        text-align: right;
    }

    .responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--pl-muted);
        text-align: left;
        flex-shrink: 0;
    }

    .responsive-table tbody td.td-name {
        font-size: 1.05rem;
        padding-bottom: 0.5rem;
    }

    .responsive-table tbody td.td-name::before {
        content: "";
    }

    .clock-card {
        padding: 1.25rem;
    }
}


/* ---------- Nav extras (admin) ---------- */
.nav-signout {
    font-size: 0.85rem;
    opacity: 0.9;
}

.nav-admin-name {
    font-weight: 600;
}

.footer-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.footer-link:hover {
    color: #fff;
}

/* ---------- Clock page: employee identity ---------- */
.last4-input {
    font-size: 1.6rem;
    letter-spacing: 0.35em;
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.identity-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--pl-green-100);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
}

.identity-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pl-green-700);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.identity-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--pl-green-900);
    line-height: 1.2;
}

.identity-sub {
    font-size: 0.8rem;
    color: var(--pl-muted);
}

.identity-change {
    margin-left: auto;
    font-size: 0.85rem;
    white-space: nowrap;
}

.badge-admin {
    background: var(--pl-gold);
    color: #2a2200;
}

.badge-regular {
    background: #cfd8d3;
    color: #22302a;
}

.badge-inactive {
    background: #e9ecef;
    color: #6c757d;
}

/* ---------- Login page ---------- */
.login-wrap {
    max-width: 440px;
    margin: 0 auto;
}

/* ---------- Employee admin ---------- */
.row-inactive td {
    color: var(--pl-muted);
}

.btn-sm-action {
    font-size: 0.8rem;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
}

/* Lighter placeholders so hints aren't mistaken for typed values */
.form-control::placeholder {
    color: #b3bcb7;
    opacity: 1;
    font-weight: 400;
    letter-spacing: normal;
}

/* ---------- Daily report: employee groups ---------- */
.session-table tr.group-row td {
    background: var(--pl-green-100);
    border-top: 2px solid #cfe3d8;
    padding: 0.7rem 1rem;
}

.group-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.group-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--pl-green-900);
}

.group-total {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--pl-green-900);
}

.session-table tr.session-row td:first-child {
    padding-left: 1.5rem;
}

@media (max-width: 767.98px) {
    .session-table tr.group-row {
        padding: 0;
        background: var(--pl-green-100) !important;
    }

    .session-table tr.group-row td {
        display: block;
        text-align: left;
        padding: 0.75rem 1rem;
    }

    .session-table tr.group-row td::before {
        content: none;
    }

    .group-total {
        margin-left: 0;
        width: 100%;
    }

    .session-table tr.session-row td:first-child {
        padding-left: 0;
    }
}
