/* gma Modern Admin CSS - White & Blue Theme */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #02529c; /* Rich Deep Blue */
    --primary-light: #e0effe; /* Soft Blue Highlight */
    --accent: #2563eb;
    --background: #f8fafc; /* Sleek Off-White */
    --sidebar-bg: #ffffff; /* Clean White Sidebar */
    --navbar-bg: #ffffff; /* Clean White Navbar */
    --card-bg: #ffffff;
    --text-main: #1e293b; /* Dark Slate Text */
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --font-family: 'Poppins', sans-serif;
    --sidebar-width: 260px;
    --header-height: 70px;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Layout Wrapper */
.wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
}

/* Header Navbar */
.main-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--header-height);
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.main-header .logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    height: 100%;
}

.main-header .navbar-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Sidebar Navigation */
.main-sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    z-index: 1020;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
}

.sidebar {
    padding: 1rem 0;
}

.user-panel {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
    background-color: #fafbfc;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.user-panel .image img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.75rem;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.user-panel .info p {
    margin: 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.user-panel .info a {
    font-size: 0.75rem;
    color: #10b981;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

/* Menu Items */
.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0 0.5rem;
}

.sidebar-menu .header {
    padding: 0.75rem 1rem 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.sidebar-menu > li {
    margin-bottom: 2px;
}

.sidebar-menu > li > a {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    border-radius: 8px;
}

.sidebar-menu > li > a i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 6px;
    transition: color 0.15s;
}

.sidebar-menu > li > a:hover {
    color: var(--primary);
    background-color: #f1f5f9;
}

.sidebar-menu > li.active > a {
    color: var(--primary);
    background-color: var(--primary-light);
    font-weight: 600;
}

.sidebar-menu > li.active > a i {
    color: var(--primary);
}

/* Treeview Menu */
.sidebar-menu .treeview-menu {
    list-style: none;
    padding: 0.25rem 0 0.25rem 1rem;
    margin-left: 1.75rem;
    border-left: 1.5px solid var(--border-color);
    background-color: transparent;
    display: none;
}

.sidebar-menu .treeview.menu-open .treeview-menu {
    display: block;
}

.sidebar-menu .treeview-menu li {
    margin-bottom: 2px;
}

.sidebar-menu .treeview-menu a {
    display: flex;
    align-items: center;
    padding: 0.45rem 1rem;
    font-size: 0.825rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.15s;
    border-radius: 6px;
}

.sidebar-menu .treeview-menu a i {
    font-size: 0.4rem;
    margin-right: 8px;
    width: auto;
}

.sidebar-menu .treeview-menu a:hover,
.sidebar-menu .treeview-menu .active a {
    color: var(--primary);
    background-color: #f8fafc;
}

/* Rotate treeview icon */
.sidebar-menu .treeview .pull-right-container {
    margin-left: auto;
    transition: transform 0.2s;
}

.sidebar-menu .treeview.menu-open > a .pull-right-container {
    transform: rotate(90deg);
}

/* Content Area */
.content-wrapper {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    width: calc(100% - var(--sidebar-width));
    padding: 2rem;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

/* Footer Area */
.main-footer {
    background-color: var(--navbar-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease-in-out;
}

@media (max-width: 991.98px) {
    .main-footer {
        margin-left: 0;
    }
}

/* Page titles */
.content-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.content-header .breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
}

.content-header .breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

/* Card Modern styling */
.card, .box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease-in-out;
}

.card:hover, .box:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.card-header, .box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.card-title, .box-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

/* Dashboard Info/Stat Boxes */
.info-box {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-bottom: 1.5rem;
    height: 100px;
}

.info-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    color: #ffffff;
    font-size: 2rem;
}

.info-box-icon.bg-aqua { background-color: var(--accent) !important; }
.info-box-icon.bg-red { background-color: #ef4444 !important; }
.info-box-icon.bg-green { background-color: #10b981 !important; }

.info-box-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 1.25rem;
    flex: 1;
}

.info-box-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
}

.info-box-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Forms & Inputs styling */
.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: 0;
}

.form-group label {
    font-weight: 550;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 550;
    font-size: 0.875rem;
    font-family: var(--font-family);
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #013f7a;
    border-color: #013f7a;
}

.btn-danger {
    background-color: #ef4444;
    border-color: #ef4444;
}

.btn-success {
    background-color: #10b981;
    border-color: #10b981;
}

.btn-warning {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff;
}

.btn-flat {
    border-radius: 8px !important;
}

/* Tables styling */
.table {
    width: 100% !important;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.table th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-main);
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafbfc;
}

.table-hover tbody tr:hover {
    background-color: #f1f5f9;
}

/* Badges / Status */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 4px;
}

.bg-green, .badge-success { background-color: #10b981 !important; color: #fff; }
.bg-red, .badge-danger { background-color: #ef4444 !important; color: #fff; }
.bg-yellow, .badge-warning { background-color: #f59e0b !important; color: #fff; }
.bg-aqua, .badge-primary { background-color: var(--accent) !important; color: #fff; }

/* Login Page custom styles */
.login-page {
    background: linear-gradient(135deg, #0038a8 0%, #001e5c 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

.login-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 35px 35px;
    pointer-events: none;
    z-index: 1;
}

.login-box {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo a {
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.login-box-body {
    background: transparent;
    padding: 0;
}

.login-box-msg {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Sidebar Toggle */
.sidebar-toggle-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.sidebar-toggle-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Responsive Collapse styles */
@media (max-width: 991.98px) {
    .main-sidebar {
        transform: translateX(-100%);
    }
    
    .content-wrapper {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
    }
    
    .sidebar-open .main-sidebar {
        transform: translateX(0);
    }
    
    .sidebar-open .content-wrapper {
        position: relative;
    }
    
    .sidebar-open .content-wrapper::before {
        content: '';
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 1010;
    }
}

/* User Menu Profile Dropdown */
.dropdown-menu-end {
    right: 0;
    left: auto;
}

.user-menu .dropdown-toggle img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.dropdown-item {
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.dropdown-item i {
    width: 20px;
}
