/* Base Fonts & Reset */
body {
    font-family: 'Poppins', 'Roboto', sans-serif;
    background-color: #f3f4f6;
    /* Gris muy suave */
    margin: 0;
    padding: 0;
    color: #1f2937;
    font-size: 14px;
}

/* ================= LOGIN STYLES ================= */
.material-half-bg {
    height: 100vh;
    background-color: #e7e7e7;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.material-half-bg .cover {
    height: 50vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    /* Navy Gradient */
}

.login-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-content .logo {
    margin-bottom: 40px;
    font-family: 'Poppins', sans-serif;
    color: #fff;
}

.login-content .logo h1 {
    font-size: 52px;
    font-weight: 700;
    margin: 0;
}

.login-box {
    position: relative;
    width: 380px;
    min-height: 420px;
    background-color: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    overflow: hidden;
}

.login-box .login-form {
    padding: 40px;
}

.login-box .login-head {
    margin-bottom: 30px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    font-size: 20px;
}

.login-box .login-head i {
    margin-right: 15px;
    color: #009688;
}

/* Teal Icon */

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    transition: all 0.2s;
    background-color: #f9fafb;
}

.form-control:focus {
    border-color: #009688;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.1);
}

.btn-container {
    margin-top: 35px;
}

.btn-primary {
    background: #009688;
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: #00796b;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* ================= ADMIN DASHBOARD (SIAM Pro) ================= */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER (White) */
.app-header {
    position: fixed;
    left: 250px;
    right: 0;
    top: 0;
    height: 64px;
    display: flex;
    background-color: #ffffff;
    z-index: 1030;
    padding-right: 30px;
    align-items: center;
    transition: left 0.3s ease;
    border-bottom: 1px solid #e5e7eb;
}

.header-welcome {
    font-weight: 600;
    font-size: 16px;
    color: #111827;
    margin-left: 10px;
}

/* Toggle & Nav */
.app-sidebar__toggle {
    padding: 0 20px;
    line-height: 64px;
    color: #6b7280;
    font-family: FontAwesome;
    font-size: 18px;
    text-decoration: none;
}

.app-sidebar__toggle:before {
    content: "\f0c9";
}

.app-nav {
    flex: 1;
    margin-bottom: 0;
    text-align: right;
    list-style: none;
    padding-left: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.app-nav__item {
    display: block;
    padding: 0 15px;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 18px;
}

.app-nav__item:hover {
    color: #009688;
}

.badge {
    position: absolute;
    margin-top: -8px;
    margin-left: -8px;
    font-size: 10px;
}

/* SIDEBAR (Dark Navy) */
.app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 250px;
    background-color: #0f172a;
    /* Dark Navy */
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
}

/* Sidebar Logo */
.sidebar-logo {
    height: 64px;
    display: flex;
    align-items: center;
    padding-left: 24px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-box {
    background: #009688;
    color: #fff;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin-right: 12px;
}

.logo-text {
    letter-spacing: 0.5px;
}

/* Sidebar Menu Area */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #334155;
}

.app-menu {
    list-style: none;
    padding: 0 16px;
    margin: 0;
}

.treeview-header {
    color: #64748b;
    /* Slate 500 */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 20px 12px 10px 12px;
}

.app-menu__item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #94a3b8;
    /* Text Color Inactive */
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    margin-bottom: 2px;
}

.app-menu__item:hover {
    background-color: #1e293b;
    color: #fff;
}

/* Treeview Styles */
.treeview-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
}

.treeview.is-expanded .treeview-menu {
    display: block;
}

.treeview-item {
    display: flex;
    align-items: center;
    padding: 8px 12px 8px 46px;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s;
}

.treeview-item:hover {
    color: #ffffff;
}

.treeview-item .icon {
    font-size: 10px;
    margin-right: 8px;
    opacity: 0.6;
}

.treeview-indicator {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.treeview.is-expanded .treeview-indicator {
    transform: rotate(90deg);
}

.app-menu__item.active {
    background-color: #009688;
    /* Active Teal */
    color: #ffffff;
}

.app-menu__icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    margin-right: 12px;
    opacity: 0.8;
}

/* Sidebar Footer (User) */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    background-color: #0d1424;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #334155;
    color: #009688;
    /* Teal Text */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-right: 12px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    color: #64748b;
    font-size: 12px;
}

/* CONTENT */
.app-content {
    margin-left: 250px;
    margin-top: 64px;
    padding: 30px;
    background-color: #ffffff;
    /* White content bg like image */
    min-height: calc(100vh - 64px);
    transition: margin-left 0.3s ease;
}

/* Collapsed State */
.sidenav-toggled .app-sidebar {
    left: -250px;
}

.sidenav-toggled .app-content {
    margin-left: 0;
}

.sidenav-toggled .app-header {
    left: 0;
}

/* DASHBOARD WIDGETS */
.widget-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    height: 100%;
}

.widget-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.text-teal {
    color: #009688;
}

.text-success {
    color: #10b981;
}

.widget-value {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.widget-desc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 5px;
}

/* Helpers */
.text-center {
    text-align: center;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ================= FORM CONTROLS FIX ================= */
.form-control {
    min-height: 45px;
    padding: 8px 12px;
}

select.form-control:not([size]):not([multiple]) {
    height: 45px !important;
    padding-top: 8px;
}

/* Page Header & Breadcrumbs */
.app-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    background-color: #FFF;
    margin: -30px -30px 30px;
    padding: 20px 30px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.app-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
}

.app-title p {
    margin-bottom: 0;
    font-style: italic;
}

.app-breadcrumb {
    margin-bottom: 0;
    text-align: right;
    font-weight: 500;
    font-size: 13px;
    text-transform: capitalize;
    padding: 0;
    text-align: left;
    padding: 0;
    background-color: transparent;
}

.breadcrumb-item {
    display: inline-block;
}

.breadcrumb-item+.breadcrumb-item::before {
    display: inline-block;
    padding-right: .5rem;
    padding-left: .5rem;
    color: #6c757d;
    content: "/";
}