/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600&display=swap');

/* ── Base ── */
html, body { height: 100%; }

body {
    font-family: 'IBM Plex Sans Thai', sans-serif;
    background-color: #f0f4f8;
}

#app-layout { height: 100% !important; }

/* ── Topbar ── */
.app-topbar {
    background-color: #1a2744;
    height: 52px;
    flex-shrink: 0;
}

.app-topbar .navbar-brand {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.app-topbar .navbar-brand:hover { color: #fff; }

.btn-topbar {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.btn-topbar:hover,
.btn-topbar:focus {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.topbar-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    border: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}
.topbar-user-btn:hover,
.topbar-user-btn:focus {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.topbar-user-btn .topbar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34d399, #059669);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

/* ── Sidebar ── */
.app-sidemenu,
.float-menu {
    background-color: #1a2744 !important;
}

.app-sidemenu .sidebar-section-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.28);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 12px 18px 6px;
}

.menu-item > a {
    color: rgba(255,255,255,0.65) !important;
    background-color: transparent !important;
    border-radius: 6px !important;
    margin: 1px 8px !important;
    width: calc(100% - 16px) !important;
    font-size: 13.5px;
    padding: 9px 12px !important;
}

.menu-item > a:hover {
    background-color: #243256 !important;
    color: rgba(255,255,255,0.9) !important;
}

.menu-item > a.active {
    background-color: #2563eb !important;
    color: #fff !important;
}

.menu-item > a i {
    opacity: 0.75;
}
.menu-item > a:hover i,
.menu-item > a.active i {
    opacity: 1;
}

/* ── Table row actions ── */
.row-actions .btn { opacity: 0; transition: opacity 0.15s; }
tr:hover .row-actions .btn { opacity: 1; }

/* ── Floating label form ── */
.form-floating.tlk-floating>.form-control-plaintext~label,
.form-floating.tlk-floating>.form-control:focus~label,
.form-floating.tlk-floating>.form-control:not(:placeholder-shown)~label,
.form-floating.tlk-floating>.form-select~label {
    transform: scale(.85) translateY(-0.7rem) translateX(.15rem);
    background-color: white;
    line-height: 1em;
    height: 1em;
    padding-top: 0;
    padding-bottom: 0;
}

.collapse.show { visibility: visible !important; }

/* ── Font Awesome vertical alignment fix ── */
.fa::before, [class^="fa-"]::before, [class*=" fa-"]::before {
    line-height: 1.1em !important;
    vertical-align: -0.5rem;
}
.fa, [class^="fa-"], [class*=" fa-"] {
    line-height: 1.525em !important;
}
