/* =========================
   RESET
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

/* =========================
   ROOT COLORS (รวมหน้าแรก)
========================= */
:root {
    /* Warm wood */
    --wood-deep:   #6B4226;
    --wood-soft:   #C08A53;

    /* Harbor (น้ำเงินเทาเข้ม) */
    --harbor:      #1E293B;

    /* Sea green */
    --sea-green:   #0EB7A0;

    /* Sky grey */
    --sky-grey:    #CBD5E1;

    /* Pearl shell */
    --pearl-shell: #F8F5EF;
}

/* =========================
   GLOBAL / BODY
   Calming blue background
========================= */
body {
    font-family: Aktiv Grotesk Thai, Arial, sans-serif;
    background-color: #F5F7FA;
    color: #1F2933;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    /* ไม่ใช้ padding ที่ body แล้ว ไปชดเชยที่ .container/.page-wrapper แทน */
    padding-top: 16px;
    padding-bottom: 0;
}

/* =========================
   HEADER + NAV
========================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;

    background: linear-gradient(90deg, #FFFFFF 0%, #E4EFF9 35%, #D3E3FF 70%, #F4E3C8 100%);
    color: #1F2933;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
    border-bottom: 1px solid #D9E2EC;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* เมนูด้านขวา */
.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.main-nav a {
    color: #34495E;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 8px;
    font-size: 13px;
}

.main-nav a:hover {
    color: #2563EB;
    text-decoration: none;
}

.main-nav .nav-spacer {
    flex: 1;
}

.main-nav .user-info {
    margin-right: 4px;
    color: #667085;
    font-size: 12px;
}

/* ปุ่ม Logout */
.main-nav .logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 14px;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid #D6B28A;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: #8B5A2B;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                box-shadow 0.15s ease, transform 0.05s ease;
}

.main-nav .logout-link:hover {
    background: linear-gradient(135deg, #FFFBF5, #F4E3C8);
    border-color: #C89A63;
    box-shadow: 0 3px 10px rgba(172, 125, 69, 0.28);
    transform: translateY(-1px);
}

/* ไอคอนเมนู */
.main-nav .nav-icon i {
    font-size: 18px;
    color: #4B5563;
    transition: color 0.2s, transform 0.1s;
}

.main-nav .nav-icon:hover i {
    color: #2563EB;
    transform: translateY(-1px);
}

/* =========================
   REMINDER ALERT (งานตามแผน)
========================= */

.reminder-alert-box {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    margin: 10px 0 16px;
    font-size: 13px;
    position: relative;
    z-index: 1;
    gap: 10px;
    flex-wrap: wrap;
}

.reminder-has-task {
    background-color: #EDF4FF;
    border: 1px solid #C4D7F5;
}

.reminder-empty {
    background-color: #F3FBF6;
    border: 1px solid #C6E6D2;
}

.reminder-alert-icon {
    margin-right: 4px;
    color: #2563EB;
}

.reminder-empty .reminder-alert-icon {
    color: #16A34A;
}

.reminder-alert-title {
    font-weight: 600;
    margin-bottom: 2px;
    color: #334155;
}

.reminder-alert-text {
    color: #4B5563;
}

.reminder-alert-action {
    margin-left: auto;
}

.btn-reminder-view {
    padding: 6px 12px;
    border-radius: 999px;
    background-color: #FFFFFF;
    color: #4B5563;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border: 2px solid #4B5563;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.15);
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease,
                box-shadow 0.15s ease, transform 0.05s ease;
}

.btn-reminder-view:hover {
    background-color: #F3F4F6;
    color: #111827;
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.22);
    transform: translateY(-1px);
}

/* =========================
   CONTAINER / CONTENT
========================= */

.container {
    max-width: 900px;
    width: 100%;
    margin: 90px auto 70px auto;  /* ใหม่: ชดเชย header ~60-70 + footer ~50 */
    background: #FFFFFF;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid #E0E7F0;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    flex: 1;
    overflow-x: hidden;
}

h1, h2 {
    color: #1F2933;
}

h2 {
    font-size: 16px;
    letter-spacing: 0.02em;
}

/* =========================
   FORM
========================= */

.form-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px 24px;
    align-items: flex-start;
    background: #F3F5F9;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #E0E7F0;
    margin-bottom: 12px;
}

.form-layout .form-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label,
.form-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #4B5563;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control,
input,
select,
textarea {
    width: 100%;
    padding: 7px 9px;
    font-size: 12px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background-color: #FFFFFF !important;
    color: #111827;
    box-sizing: border-box;
    transition: background-color 5000s ease-in-out 0s;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
input::placeholder,
textarea::placeholder {
    color: #9CA3AF;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #60A5FA;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.75);
    background-color: #FFFFFF !important;
}

/* Autofill reset */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #FFFFFF inset !important;
    box-shadow: 0 0 0px 1000px #FFFFFF inset !important;
    -webkit-text-fill-color: #111827 !important;
}

/* =========================
   BUTTONS
========================= */

.btn {
    display: inline-block;
    padding: 7px 11px;
    font-size: 12px;
    text-decoration: none;
    border-radius: 999px;
    cursor: pointer;
    border: none;
    transition: transform 0.05s ease, box-shadow 0.1s ease,
                background 0.2s ease, color 0.2s ease;
}

/* ปุ่มหลัก: เทาไล่เฉด */
.btn-primary {
    background: linear-gradient(135deg, #F9FAFB, #D1D5DB);
    color: #111827;
    border: 1px solid #4B5563;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #E5E7EB, #9CA3AF);
    color: #0F172A;
    border-color: #374151;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.26);
}

/* ปุ่มรอง */
.btn-secondary {
    background: linear-gradient(135deg, #FFFFFF, #F3F4F6);
    color: #374151;
    border: 1px solid #D1D5DB;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #E5E7EB, #D1D5DB);
    border-color: #9CA3AF;
    color: #111827;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

/* =========================
   TABLES
========================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: transparent;
}

table th,
table td {
    border: 1px solid #E0E7F0;
    padding: 5px 7px;
    font-size: 11px;
    text-align: left;
    vertical-align: top;
    color: #111827;
}

table th {
    font-weight: 600;
    white-space: nowrap;
    background-color: #F3F4F6;
}

/* notification-table */
table.notification-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(145deg, #FFFFFF, #F3F4F6) !important;
    color: #111827 !important;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #D1D5DB;
}

table.notification-table thead th {
    background: linear-gradient(135deg, #E5E7EB, #D4D4D8) !important;
    color: #374151 !important;
    font-weight: 700;
    border-bottom: 1px solid #D1D5DB;
}

table.notification-table th,
table.notification-table td {
    background: transparent !important;
    color: #111827 !important;
    font-weight: 400;
    border: 1px solid #E0E7F0;
}

table.notification-table tbody tr:nth-child(even) td {
    background: rgba(249, 250, 251, 0.9) !important;
}

table.notification-table tbody tr:hover td {
    background: linear-gradient(135deg, #E5E7EB, #F3F4F6) !important;
}

/* =========================
   FOOTER
========================= */

footer,
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    background: linear-gradient(135deg, #F9FAFB, #E5E7EB);
    color: #111827;
    text-align: center;
    padding: 6px 10px;
    font-size: 10px;   /* ใช้เป็นฐานสำหรับบรรทัดหลัก */
    font-weight: 500;
    flex-shrink: 0;
    width: 100%;
    border-top: 1px solid #D1D5DB;
    z-index: 999;
    box-shadow: 0 -4px 10px rgba(15, 23, 42, 0.05);
}

/* reset ทั่วไป */
.site-footer .footer-inner p {
    margin: 1px 0;
    white-space: nowrap;
}

/* บรรทัดหลัก (© 2026 ...) */
.site-footer .footer-inner p.footer-main {
    font-size: 10px;
    font-weight: 500;
}

/* บรรทัดย่อยให้เล็กลง */
.site-footer .footer-inner p.footer-sub {
    font-size: 9px;
    font-weight: 400;
    opacity: 0.9;
}

/* =========================
   BADGES (ทั่วไป)
========================= */

.badge-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
}

.badge-new        { background-color: #F59E0B; }
.badge-inprogress { background-color: #FACC15; color: #92400E; }
.badge-waiting    { background-color: #9CA3AF; }
.badge-done       { background-color: #22C55E; }

/* =========================
   REQUEST LIST (หน้าแจ้งซ่อม)
========================= */

.request-page {
    background-color:#F4F5F7;
}

.request-page .request-manage-container {
    max-width:900px;
    width:100%;
    margin:18px auto 24px auto;
    background:transparent;
    padding:0;
    box-shadow:none;
    border:none;
}

.request-page .request-list-header {
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-bottom:10px;
}

.request-page .request-list-header h2 {
    font-size:18px;
    font-weight:600;
    color:#1F2933;
}

.request-page .request-list-subtitle {
    font-size:13px;
    color:#6B7280;
}

.request-page .request-search-bar {
    margin-top:4px;
    display:flex;
    flex-direction:column;
    gap:6px;
}

.request-page .request-search-inner {
    position:relative;
    width:100%;
    display:flex;
    align-items:center;
}

.request-page .report-search-input {
    flex:1;
    padding:8px 40px 8px 12px;
    border-radius:999px;
    border:1px solid #D1D5DB;
    font-size:14px;
    outline:none;
    background-color:#FFFFFF;
    color:#111827;
    transition:border-color 0.15s ease, box-shadow 0.15s ease;
}
.request-page .report-search-input::placeholder {
    color:#9CA3AF;
}
.request-page .report-search-input:focus {
    border-color:#B0B8C4;
    box-shadow:0 0 0 1px rgba(176,184,196,0.6);
}

.request-page .report-search-button {
    position:absolute;
    right:6px;
    top:50%;
    transform:translateY(-50%);
    border:none;
    background:transparent;
    cursor:pointer;
    padding:4px 8px;
    color:#9CA3AF;
    font-size:16px;
}

.request-page .request-list-wrapper {
    margin-top:10px;
    padding:14px 14px 16px 14px;
    border-radius:16px;
    background: linear-gradient(145deg, #F9FAFB, #E3E6EB);
    border:1px solid #D1D5DD;
    box-shadow:0 10px 24px rgba(15,23,42,0.06);
}

.request-page .request-list-label {
    font-size:12px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:0.06em;
    color:#6B7280;
    margin-bottom:6px;
}

.request-page .badge-status {
    display:inline-block;
    padding:2px 10px;
    border-radius:999px;
    font-size:11px;
    line-height:1.4;
    border:1px solid transparent;
    font-weight:500;
}

.request-page .badge-waiting {
    background:#F9FAFB;
    color:#4B5563;
    border-color:#E5E7EB;
}

.request-page .badge-inprogress {
    background:#E5E7EB;
    color:#374151;
    border-color:#D1D5DB;
}

.request-page .badge-done {
    background:#E5E7EB;
    color:#111827;
    border-color:#9CA3AF;
}

.request-page .badge-cancel {
    background:#F3F4F6;
    color:#6B7280;
    border-color:#E5E7EB;
}

.request-page .request-card {
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:10px 10px;
    border-radius:12px;
    background: linear-gradient(145deg, #FFFFFF, #F3F4F6);
    border:1px solid #E1E4EA;
    box-shadow:0 4px 12px rgba(15,23,42,0.04);
    margin-top:8px;
}

.request-page .request-status-icon {
    width:28px;
    height:28px;
    border-radius:999px;
    background:#E5E7EB;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:13px;
    color:#4B5563;
    flex-shrink:0;
}

.request-page .request-card-body {
    flex:1;
    display:flex;
    flex-direction:column;
}

.request-page .request-card-top-row {
    display:flex;
    align-items:flex-start;
    gap:8px;
    margin-bottom:4px;
}

.request-page .request-meta-right {
    margin-left:auto;
    text-align:right;
    font-size:11px;
}

.request-page .request-datetime {
    color:#9CA3AF;
}

.request-page .request-location {
    font-size:12px;
    color:#6B7280;
    margin-bottom:2px;
}

.request-page .request-title {
    font-weight:600;
    font-size:14px;
    margin:0;
    color:#111827;
}

.request-page .request-description {
    font-size:12px;
    color:#4B5563;
}

.request-page .request-card-actions {
    margin-top:6px;
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.request-page .btn-edit-wood {
    display:inline-flex;
    align-items:center;
    padding:4px 12px;
    border-radius:999px;
    border:1px solid #D1D5DB;
    background: linear-gradient(135deg, #F9FAFB, #E5E7EB);
    color:#374151;
    font-size:12px;
    font-weight:500;
    text-decoration:none;
    cursor:pointer;
    box-shadow:0 2px 7px rgba(15,23,42,0.08);
    transition:background-color 0.15s ease, box-shadow 0.15s ease,
               transform 0.05s ease, border-color 0.15s ease, color 0.15s ease;
}
.request-page .btn-edit-wood:hover {
    background: linear-gradient(135deg, #E5E7EB, #D1D5DB);
    border-color:#9CA3AF;
    color:#111827;
    box-shadow:0 3px 10px rgba(15,23,42,0.12);
    transform:translateY(-1px);
}

.request-page .btn-delete-outline {
    display:inline-flex;
    align-items:center;
    padding:4px 12px;
    border-radius:999px;
    border:1px solid #E5E7EB;
    background:#FFFFFF;
    color:#7F1D1D;
    font-size:12px;
    font-weight:500;
    cursor:pointer;
    text-decoration:none;
    transition:background-color 0.15s ease, color 0.15s ease,
               box-shadow 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
}
.request-page .btn-delete-outline:hover {
    background:#F9FAFB;
    color:#991B1B;
    border-color:#D1D5DB;
    box-shadow:0 3px 9px rgba(148,163,184,0.25);
    transform:translateY(-1px);
}

.request-page .no-data-text {
    margin-top:8px;
    font-size:13px;
    color:#9CA3AF;
}

@media (max-width: 600px){
    .request-page .request-card-top-row{
        flex-direction:column;
    }
    .request-page .request-meta-right{
        margin-left:0;
        text-align:left;
        margin-top:4px;
    }
}

/* =========================
   HOME MENU
========================= */

.home-menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.home-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #E0E7F0;
    background-color: #FFFFFF;
    text-decoration: none;
    color: #111827;
    font-size: 13px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.home-menu-item i {
    width: 20px;
    text-align: center;
    color: #2563EB;
}

.home-menu-item:hover {
    border-color: #CBD5E1;
    background-color: #F5F7FA;
}

/* =========================
   TECH PROFILE
========================= */

.tech-all-wrapper {
    margin-top: 10px;
}

.tech-profile-block {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #E0E7F0;
    background: #FFFFFF;
}

.tech-profile-block h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #111827;
}

.tech-photo-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-photo-box.tech-photo-small img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #E0E7F0;
}

.tech-photo-box .photo-placeholder {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #9CA3AF;
    background: #F3F4F6;
    border-radius: 6px;
    border: 1px dashed #CBD5E1;
}

/* =========================
   DASHBOARD LAYOUT & CARDS (NEW)
========================= */

.dashboard-shell {
    margin-top: 16px;
    margin-bottom: 18px;
    background: #FFFFFF;
    padding: 16px 18px 20px 18px;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.dashboard-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.dashboard-header-main {
    flex: 1 1 auto;
    min-width: 220px;
}

.dashboard-header-title {
    margin: 0;
    font-size: 22px;        /* ขยายให้หัวเด่นขึ้น */
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #111827;
}

.dashboard-header-subtitle {
    margin: 4px 0 0 0;
    color: #6B7280;
    font-size: 13px;
    line-height: 1.5;
}

/* ให้ลิงก์ “ดูสรุปงานวันนี้” ลงบรรทัดใหม่ */
.dashboard-header-subtitle a {
    display: block;
    margin-top: 2px;
}

.dashboard-header-actions {
    flex: 0 0 auto;
}

.btn-pill-primary {
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12px;
    background: #1D4ED8;
    color: #FFFFFF !important;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
    transition: transform 0.05s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}

.btn-pill-primary:hover {
    background: #1E40AF;
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.45);
    transform: translateY(-1px);
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.kpi-card {
    position: relative;
    border-radius: 14px;
    padding: 12px 14px 14px 14px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
    color: #111827;
    text-decoration: none;
    display: block;
    transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    min-height: 96px;
}

.kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    border-color: #CBD5E1;
}

.kpi-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6B7280;
    margin-bottom: 6px;
}

.kpi-body {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.kpi-value {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
}

.kpi-unit {
    font-size: 11px;
    color: #6B7280;
}

.kpi-desc {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 6px;
}

.kpi-icon {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 22px;
    color: #E5E7EB;
}

.kpi-primary .kpi-value { color: #1D4ED8; }
.kpi-success .kpi-value { color: #15803D; }
.kpi-warning .kpi-value { color: #B45309; }
.kpi-muted   .kpi-value { color: #374151; }

.kpi-text-card .kpi-value {
    font-size: 18px;
    font-weight: 600;
}

.dashboard-secondary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-bottom: 10px;
}

.dashboard-panel {
    margin-top: 18px;
    padding: 14px 16px 16px 16px;
    border-radius: 14px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.dashboard-panel h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.dashboard-panel p {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #6B7280;
}

.progress-outer {
    width: 100%;
    height: 10px;
    background: #E5E7EB;
    border-radius: 999px;
    overflow: hidden;
}

.progress-inner {
    height: 100%;
    border-radius: 999px;
}

.progress-today {
    background: linear-gradient(90deg, #60A5FA, #2563EB);
}

.progress-month {
    background: linear-gradient(90deg, #A5B4FC, #4F46E5);
}

.progress-all {
    background: linear-gradient(90deg, #9CA3AF, #4B5563);
}

/* container ของ dashboard-page ใช้ร่วมกับ wrapper ใน dashboard.php */
.dashboard-page .container {
    max-width: 960px;
    margin: 10px auto 18px auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 18px;
}

/* ไม่ต้องมี padding-top/bottom ที่ .dashboard-page แล้ว เพราะใช้ .dashboard-wrapper-outer แทน */

@media (max-width: 480px) {
    .dashboard-shell {
        border-radius: 0;
        padding: 12px 10px 16px 10px;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .dashboard-page .container {
        margin: 4px auto 14px auto;
        padding: 0 10px;
        max-width: 100%;
    }

    .dashboard-header-row {
        align-items: flex-start;
    }

    .dashboard-header-title {
        font-size: 18px;
    }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-secondary-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   BRAND HERO – Luxury Neutral
========================= */

.brand-hero {
    max-width: 960px;
    margin: 8px auto 14px auto;
    padding: 18px 22px;
    border-radius: 20px;
    background: radial-gradient(circle at top left, #FAF4EC, #F1ECE5);
    border: 1px solid #DED2C3;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.10);
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-hero-mark {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #C7A76A, #8A6A3F);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFDF7;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 10px 24px rgba(87, 64, 34, 0.45);
}

.brand-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.brand-hero-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #1F2933;
}

.brand-hero-tagline {
    font-size: 15px;
    font-weight: 600;
    color: #292524;
}

.brand-hero-tagline-en {
    font-size: 13px;
    font-weight: 500;
    color: #4B5563;
}

.brand-hero-subline {
    margin-top: 3px;
    font-size: 12px;
    color: #6B7280;
}

/* ย่อหน้าใต้การ์ดล็อกอิน */
.welcome-ops-note {
    margin-top: 8px;
    font-size: 13px;
    color: #4B5563;
}

@media (max-width: 480px) {
    .brand-hero {
        margin: 6px 10px 10px 10px;
        padding: 12px 14px;
        border-radius: 16px;
        gap: 10px;
    }

    .brand-hero-mark {
        width: 44px;
        height: 44px;
        font-size: 22px;
        border-radius: 14px;
    }

    .brand-hero-name {
        font-size: 18px;
        letter-spacing: 0.08em;
    }

    .brand-hero-tagline {
        font-size: 14px;
    }

    .brand-hero-tagline-en {
        font-size: 12px;
    }

    .brand-hero-subline {
        font-size: 11px;
    }

    .welcome-ops-note {
        font-size: 12px;
    }
}

/* =========================
   HOME: WELCOME CARD + HERO
========================= */

.welcome-card {
    max-width: 720px;
    margin: 24px auto 20px auto;
    padding: 20px 22px;
    border-radius: 18px;
    background: #FFFFFF;
    color: #1F2933;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
    border: 1px solid #E0E7F0;
    position: relative;
    overflow: hidden;
}

.welcome-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--harbor);
}

.welcome-text p {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #4B5563;
}

.welcome-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ปุ่มหน้าแรก */
.btn-login-main,
.btn-go-dashboard {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--wood-deep);
    background: linear-gradient(135deg, var(--wood-soft), #A66A3F);
    color: #FEF9F3;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(107, 66, 38, 0.35);
}
.btn-login-main:hover,
.btn-go-dashboard:hover {
    background: linear-gradient(135deg, #D19B63, #B47445);
    border-color: var(--wood-deep);
}

.btn-register-main {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid #C8B49D;
    background: #FFFFFF;
    color: var(--wood-deep);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}
.btn-register-main:hover {
    background: #FFF5E8;
}

/* HERO text entrance animation */
@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(14px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HERO CARD แยกจากการ์ด welcome */
.hero-card {
    max-width: 720px;
    margin: 16px auto 22px auto;   /* ระยะห่างจากการ์ดบน/ล่าง */
    padding: 18px 22px;
    border-radius: 20px;
    background: #FFFFFF;
    border: 1px solid #E0E7F0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
}

.hero-card-inner {
    text-align: center;            /* จัดข้อความกลางการ์ด */
}

/* ให้ทุกบรรทัดเป็น handwriting + animation */
.hero-card .hero-line {
    font-family: "Golden", "Angleface", "Lucida Handwriting", cursive;
    line-height: 1.5;
    margin-bottom: 6px;

    opacity: 0;
    transform: translateY(14px);
    animation-name: heroFadeUp;
    animation-duration: 0.7s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

/* tagline: ใหญ่สุด เน้น */
.hero-card .hero-tagline {
    font-size: 22px;
    color: #111827;
    margin-bottom: 8px;
    animation-delay: 0s;
}

/* builtby: เล็กลงนิดหน่อย สีอ่อนลง */
.hero-card .hero-builtby {
    font-size: 16px;
    color: #6B7280;
    animation-delay: 0.12s;
}

/* CTA: ขนาดกลาง คอนทราสต์สูงขึ้นนิดหน่อย */
.hero-card .hero-cta {
    font-size: 18px;
    color: #215E8A;
    margin-top: 6px;
    animation-delay: 0.24s;
}

/* block ปุ่มอีเมล ให้ห่างจากข้อความ */
.hero-card .hero-email-cta {
    margin-top: 12px;
}

/* ปุ่มและข้อความอีเมล */
.hero-email-button {
    border-radius: 999px;
    background: linear-gradient(135deg, #C08A53, #A66A3F);
    border: 2px solid #8B5A2B;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 18px;
    box-shadow: 0 3px 9px rgba(107, 66, 38, 0.28);
}
.hero-email-button:hover {
    background: linear-gradient(135deg, #D19B63, #B47445);
    border-color: #6B4226;
}

.hero-email-text {
    margin-top: 6px;
    font-size: 13px;
    color:#4B5563;
}

@media (max-width: 480px) {
    .hero-card {
        margin: 12px auto 18px auto;
        padding: 14px 12px;
        border-radius: 16px;
    }

    .hero-card .hero-tagline {
        font-size: 20px;
    }

    .hero-card .hero-builtby {
        font-size: 15px;
    }

    .hero-card .hero-cta {
        font-size: 17px;
    }
}

/* =========================
   HOME SECTION / SLIDER / FEATURES
========================= */

.home-section {
    margin-top: 26px;
}

.home-section-title {
    font-size: 18px;
    color: #111827;
    margin-bottom: 6px;
    text-align: center;
}

.home-section-subtitle {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 14px;
    text-align: center;
}

.home-slider-section {
    padding: 18px 0 8px 0;
}

.home-image-slider {
    position: relative;
    width: 100%;
    padding-top: 40%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    background: #0F172A;
}

.home-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
}

.home-slide.slide-1 { background-image: url('images/imageshotel-workflow-8.jpg'); }
.home-slide.slide-2 { background-image: url('images/imageshotel-workflow-11.jpg'); }
.home-slide.slide-3 { background-image: url('images/imageshotel-workflow-3.jpg'); }
.home-slide.slide-4 { background-image: url('images/imageshotel-workflow-12.jpg'); }
.home-slide.slide-5 { background-image: url('images/imageshotel-workflow-10.jpg'); }
.home-slide.slide-6 { background-image: url('images/imageshotel-workflow-6.jpg'); }

.home-features-section {
    padding-bottom: 36px;
}

.home-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

/* feature cards – เวอร์ชันหรูแบบ grey tones */
.home-feature-card {
    border-radius: 16px;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
}

/* แถบด้านบน */
.home-feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #4B5563, #9CA3AF);
}

/* base h3 */
.home-feature-card h3 {
    margin: 4px -4px 6px -4px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #262626;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: #F5F5F5;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* header tones */
.home-feature-card.card-grey-1 h3 {
    background: radial-gradient(circle at top left, #FDFBF7, #E9E0D0);
    border-color: #E0D0B8;
}
.home-feature-card.card-grey-2 h3 {
    background: radial-gradient(circle at top left, #F7F5F2, #D9D2C6);
    border-color: #C8BFAF;
}
.home-feature-card.card-grey-3 h3 {
    background: radial-gradient(circle at top left, #F8F4F2, #D7C5B8);
    border-color: #C3AA94;
}
.home-feature-card.card-grey-4 h3 {
    background: radial-gradient(circle at top left, #F4F4F5, #D4D4D8);
    border-color: #B0B0B8;
}

/* body backgrounds */
.home-feature-card.card-grey-1 {
    background: linear-gradient(145deg, #F9FAFB, #E7EAEE);
    border-color: #D4D7DD;
}
.home-feature-card.card-grey-2 {
    background: linear-gradient(145deg, #F5F4F2, #E1DDD6);
    border-color: #CEC5B7;
}
.home-feature-card.card-grey-3 {
    background: linear-gradient(145deg, #ECEFF3, #C7CED8);
    border-color: #A0A8B3;
}
.home-feature-card.card-grey-4 {
    background: linear-gradient(145deg, #E3E6EB, #B4BCC8);
    border-color: #8B93A1;
}

.home-feature-card p {
    margin: 0;
    font-size: 13px;
    color: #4B5563;
    line-height: 1.6;
}

.home-feature-tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* badges */
.feature-badge-sea {
    padding: 2px 10px;
    border-radius: 999px;
    background-color: rgba(14, 183, 160, 0.06);
    color: var(--sea-green);
    font-size: 11px;
    font-weight: 600;
}

.feature-badge-sky {
    padding: 2px 10px;
    border-radius: 999px;
    background-color: rgba(148, 163, 184, 0.18);
    color: #374151;
    font-size: 11px;
}

.feature-badge-pearl {
    padding: 2px 10px;
    border-radius: 999px;
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    color: #6B7280;
    font-size: 11px;
}

/* Feature text animations */
@keyframes featureFadeUp {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes featureTagPulse {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

/* ข้อความหัวการ์ด + เนื้อความ */
.home-feature-card h3,
.home-feature-card p {
    animation-name: featureFadeUp;
    animation-duration: 0.7s;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
}

/* ให้หัวข้อเข้าเร็วกว่าตัวหนังสือเล็กน้อย */
.home-feature-card h3 {
    animation-delay: 0.05s;
}
.home-feature-card p {
    animation-delay: 0.12s;
}

/* แท็กด้านล่าง ขยับเบาๆ loop ช้า ๆ */
.home-feature-tags .feature-badge-sea,
.home-feature-tags .feature-badge-sky,
.home-feature-tags .feature-badge-pearl {
    animation: featureTagPulse 3.2s ease-in-out infinite;
}

/* ให้แต่ละการ์ดและแท็กไม่กระดิกพร้อมกันเป๊ะๆ */
.home-feature-card:nth-child(1) .home-feature-tags span {
    animation-delay: 0.0s;
}
.home-feature-card:nth-child(2) .home-feature-tags span {
    animation-delay: 0.4s;
}
.home-feature-card:nth-child(3) .home-feature-tags span {
    animation-delay: 0.8s;
}
.home-feature-card:nth-child(4) .home-feature-tags span {
    animation-delay: 1.2s;
}

/* HOME: SLIDER ARROWS */
.home-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.55);
    color: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    line-height: 1;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.home-slider-prev { left: 10px; }
.home-slider-next { right: 10px; }

.home-slider-arrow:hover {
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.5);
    transform: translateY(-50%) scale(1.03);
}

/* =========================
   RESPONSIVE / MOBILE
========================= */

img, table, input, select, textarea {
    max-width: 100%;
}

@media (max-width: 768px) {
    .home-section-title { font-size: 16px; }
    .home-image-slider { border-radius: 12px; }
}

@media (max-width: 480px) {

    body {
        min-height: 100vh;
        font-size: 13px;
        /* กัน header + footer บนมือถือ เช่นเดียวกับ desktop แต่เผื่อสูงกว่า */
        padding-top: 0px;
        padding-bottom: 0px;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 6px 10px;
        width: 100%;
    }

    .brand-title {
        font-size: 1.1rem;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
        flex-wrap: wrap;
    }

    .main-nav a {
        margin-left: 0;
        font-size: 13px;
    }

    .main-nav .nav-spacer {
        flex-basis: 100%;
        height: 0;
    }

    .main-nav .user-info {
        order: 10;
        font-size: 11px;
    }

    .main-nav .logout-link {
        order: 11;
        padding: 4px 10px;
        font-size: 11px;
    }

    @media (max-width: 480px) {

    .container {
        margin: 82px 0 70px 0;  /* header มือถือสูงกว่านิดหน่อย */
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        padding: 12px 10px;
        border-left: none;
        border-right: none;
    }

    ...
}


    .reminder-alert-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .reminder-alert-action {
        margin-left: 0;
        width: 100%;
        margin-top: 6px;
    }

    .btn-reminder-view {
        display: inline-flex;
        justify-content: center;
        width: 100%;
        text-align: center;
        white-space: normal;
    }

    .home-feature-card {
        border-radius: 12px;
        padding: 10px 12px;
    }

    .home-feature-card h3 {
        font-size: 14px;
        padding: 7px 9px;
    }

    .home-feature-card p {
        font-size: 12px;
    }
}

/* =========================
   NOTIFICATION ICON & LIST
========================= */

.nav-icon.nav-notifications {
    position: relative;
}

.noti-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #EF4444;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-item {
    border-bottom: 1px solid #E0E7F0;
    padding: 8px 0;
}

.notification-item.noti-unread {
    background-color: #F5F7FA;
}

.notification-item .noti-message {
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-item .noti-meta {
    font-size: 12px;
    color: #6B7280;
    display: flex;
    gap: 10px;
    align-items: center;
}

.notification-item .noti-link {
    color: #2563EB;
    text-decoration: none;
}

.notification-item .noti-link:hover {
    text-decoration: underline;
}

/* =========================
   ASSET LIST RESPONSIVE COLUMNS
========================= */
@media (max-width: 480px) {
    .asset-table th.col-purchase,
    .asset-table th.col-price,
    .asset-table td.col-purchase,
    .asset-table td.col-price {
        display: none !important;
    }
}

/* กัน footer บังปุ่มบันทึกในหน้า asset.php บนมือถือ */
@media (max-width: 768px) {
    body.asset-page .container {
        padding-bottom: 110px; /* ใกล้เคียงความสูง footer (ลอง 90–130px แล้วจูนตามจริง) */
    }
}

/* ชดเชย header fixed สำหรับหัวข้อหน้า asset บนมือถือ */
@media (max-width: 480px) {
    body.asset-page h2 {
        margin-top: 8px;
    }
}

/* ============ REPORT BY INSPECTOR (header/footer fixed, scroll เฉพาะกลาง) ============ */

.report-inspector-page {
    height: 100vh;
    overflow: hidden; /* กันไม่ให้ body ทั้งหน้ามี scroll */
}

/* desktop / tablet */
.report-inspector-wrapper {
    position: absolute;
    top: var(--header-height, 72px) + 12px;
    bottom: var(--footer-height, 60px) +12px;
    left: 0;
    right: 0;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 16px 12px;
    box-sizing: border-box;
    background-color: #F5F7FA;
}

/* mobile - ลด offset กลับลง ไม่ให้โดนกิน */
@media (max-width: 480px) {
    .report-inspector-wrapper {
		top: var(--header-height, 72px);
		bottom: var(--footer-height, 60px);
        padding: 12px 8px;
    }
}

/* ============ TASK EDIT PAGE (header/footer fixed, scroll เฉพาะกลาง) ============ */

/* body หน้านี้ */
.task-edit-page {
    height: 100vh;
    overflow: hidden;
}

/* desktop / tablet */
.task-edit-wrapper {
    position: absolute;
    top: calc(var(--header-height, 72px) + 12px);    /* เดสก์ท็อป บวกเพิ่มกันโดนกิน */
    bottom: calc(var(--footer-height, 60px) + 12px);
    left: 0;
    right: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
    box-sizing: border-box;
    background-color: #F5F7FA;
}

/* mobile - ใช้คำเดิมเพราะไม่กลืนอยู่แล้ว */
@media (max-width: 480px) {
    .task-edit-wrapper {
        top: var(--header-height, 72px);
        bottom: var(--footer-height, 60px);
        padding: 12px 8px;
    }
}

/* ============ TASK VIEW PAGE (header/footer fixed, scroll เฉพาะกลาง) ============ */

/* body หน้านี้ */
.task-view-page {
    height: 100vh;
    overflow: hidden;
}

/* desktop / tablet */
.task-view-wrapper {
    position: absolute;
    top: calc(var(--header-height, 72px) + 12px);
    bottom: calc(var(--footer-height, 60px) + 12px);
    left: 0;
    right: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
    box-sizing: border-box;
    background-color: #F5F7FA;
}

/* mobile – ใช้ offset เดิมกันไม่ให้กลืน */
@media (max-width: 480px) {
    .task-view-wrapper {
        top: var(--header-height, 72px);
        bottom: var(--footer-height, 60px);
        padding: 12px 8px;
    }
}

/* ============ DAILY CHECK EDIT PAGE (header/footer fixed, scroll เฉพาะกลาง) ============ */

/* body หน้านี้ */
.daily-check-edit-page {
    height: 100vh;
    overflow: hidden;
}

/* wrapper ระหว่าง header/footer ที่เป็นส่วน scroll */
.daily-check-edit-wrapper {
    position: absolute;
    top: calc(var(--header-height, 72px) + 12px);
    bottom: calc(var(--footer-height, 60px) + 12px);
    left: 0;
    right: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
    box-sizing: border-box;
    /* ถ้าอยากให้พื้นหลังจางๆ เหมือนหน้าอื่น: */
    background-color: #F5F7FA;
}

/* mobile – ใช้ offset เดิมกันไม่ให้กลืน */
@media (max-width: 480px) {
    .daily-check-edit-wrapper {
        top: var(--header-height, 72px);
        bottom: var(--footer-height, 60px);
        padding: 12px 8px;
    }
}
