/* Import Font Kanit */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

:root {
    --main-green: #00a293;
    --hover-green: #008578;
    --header-blue: #0056b3;
    --sidebar-width: 260px;
    --bg-light: #f4f6f9;
}

body {
    font-family: 'Kanit', sans-serif !important; /* บังคับใช้ Kanit */
    background-color: var(--bg-light);
    color: #333;
    overflow-x: hidden;
    font-weight: 300;
}

a { text-decoration: none; }

/* --- Sidebar --- */
#wrapper { display: flex; width: 100%; align-items: stretch; }

#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: #fff;
    color: #555;
    transition: all 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    z-index: 999;
    min-height: 100vh;
}

#sidebar.active { margin-left: -var(--sidebar-width); }

.sidebar-header {
    padding: 30px 15px;
    background: #fff;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-logo-img {
    width: 80px; /* ขนาดโลโก้ */
    height: auto;
    margin-bottom: 10px;
}

.brand-title {
    color: #000;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.brand-subtitle {
    color: var(--main-green);
    font-size: 0.9rem;
    font-weight: 500;
}

.menu-label {
    font-size: 0.75rem;
    color: #bbb;
    padding: 20px 20px 5px;
    text-transform: uppercase;
    font-weight: 500;
}

#sidebar ul.components { padding: 0; margin: 0; list-style: none; }
#sidebar ul li a {
    padding: 12px 20px;
    font-size: 0.95rem;
    display: block;
    color: #555;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}
#sidebar ul li a:hover { color: var(--main-green); background: #fcfcfc; }
#sidebar ul li.active > a, a[aria-expanded="true"] {
    color: var(--main-green);
    background: #e6fffc;
    border-left-color: var(--main-green);
    font-weight: 600;
}
#sidebar ul ul a { font-size: 0.9rem !important; padding-left: 50px !important; background: #fff; color: #777; }

/* --- Content --- */
#content { width: 100%; min-height: 100vh; display: flex; flex-direction: column; }
.navbar-custom {
    background: var(--main-green);
    color: white;
    padding: 10px 20px;
    height: 60px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-toggle { color: white; background: transparent; border: none; font-size: 1.2rem; }

/* --- Cards & Tables --- */
.card-pbru { border: none; border-radius: 6px; box-shadow: 0 2px 15px rgba(0,0,0,0.05); background: white; overflow: hidden; margin-bottom: 20px; }
.card-header-blue {
    background-color: var(--header-blue);
    color: white;
    padding: 15px 25px;
    font-weight: 500;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-body-custom { padding: 0; }
.table-pbru { width: 100%; margin-bottom: 0; }
.table-pbru thead th { background-color: #fcfcfc; color: #444; font-weight: 600; border-bottom: 2px solid #eee; padding: 15px; }
.table-pbru tbody td { padding: 15px; vertical-align: middle; border-bottom: 1px solid #f0f0f0; color: #555; }

/* Status & Buttons */
.status-dot { height: 10px; width: 10px; background-color: #ddd; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-dot.saved { background-color: var(--main-green); }
.btn-circle-view {
    width: 32px; height: 32px; border-radius: 50%;
    background-color: #0d6efd; color: white; border: none;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.btn-circle-view:hover { background-color: #0b5ed7; color: white; transform: translateY(-2px); }

/* Login Page */
.login-wrapper { display: flex; min-height: 100vh; width: 100%; background: #fff; }
.login-left {
    flex: 1.5; background: url('https://images.unsplash.com/photo-1541339907198-e08756dedf3f?q=80&w=2070') no-repeat center center;
    background-size: cover; position: relative; display: flex; align-items: flex-end;
}
.login-left .overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.8)); z-index: 1; }
.login-left .content-text { position: relative; z-index: 2; padding-bottom: 60px; padding-left: 40px; }
.login-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { width: 100%; max-width: 420px; }
@media (max-width: 768px) { .login-wrapper { flex-direction: column; } .login-left { flex: 0.4; min-height: 250px; } }