/* 
 * KUA System - Custom Admin Theme (Replaces Atlantis Lite)
 * Based on Bootstrap 4
 */

/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --primary: #28a745;       /* Green */
    --primary-dark: #1e7e34;
    --secondary: #6c757d;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    
    --sidebar-width: 250px;
    --header-height: 62px;
    --footer-height: 60px;
    
    --bg-body: #f5f7fb;
    --bg-card: #ffffff;
    --text-color: #575962;
    --heading-color: #1f2d3d;
}

body {
    font-family: 'Lato', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    color: var(--text-color);
    background-color: var(--bg-body);
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    font-weight: 600;
}

/* ==========================================================================
   2. LAYOUT STRUCTURE
   ========================================================================== */
.wrapper {
    min-height: 100vh;
    position: relative;
    width: 100%;
}

.main-panel {
    position: relative;
    width: calc(100% - var(--sidebar-width));
    float: right;
    min-height: 100vh;
    transition: all 0.3s;
}

.content {
    padding: 2rem;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
}

/* ==========================================================================
   3. HEADER / NAVBAR
   ========================================================================== */
.main-header {
    background: #fff;
    min-height: var(--header-height);
    width: 100%;
    position: fixed;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
}

/* Logo Area */
.logo-header {
    width: var(--sidebar-width);
    height: var(--header-height);
    background: var(--primary);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s;
    justify-content: space-between;
}

.logo-header a.logo {
    color: #fff;
    display: flex;
    align-items: center;
}

.logo-header .navbar-toggler,
.logo-header .more {
    color: #fff;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Navbar Right Area */
.navbar-header {
    flex-grow: 1;
    background: var(--primary);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    justify-content: flex-end;
}

.navbar-header[data-background-color="green"] {
    background: var(--primary) !important;
}

/* Profile Dropdown */
.profile-pic {
    display: flex;
    align-items: center;
    color: #fff !important;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.5);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-user {
    min-width: 260px;
    padding: 0;
    border: 0;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.dropdown-user .user-box {
    display: flex;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.dropdown-user .user-box .u-text {
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dropdown-user .user-box .u-text h4 {
    margin: 0;
    font-size: 14px;
}

.dropdown-user .user-box .u-text .text-muted {
    font-size: 12px;
    margin-bottom: 5px;
}

.dropdown-item {
    padding: 10px 15px;
    font-size: 13px;
}

/* ==========================================================================
   4. SIDEBAR
   ========================================================================== */
.sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    background: #ffffff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.03);
    z-index: 999;
    transition: all 0.3s;
    overflow-y: auto;
}

.sidebar-wrapper {
    padding-bottom: 50px;
}

.sidebar .nav {
    display: flex;
    flex-direction: column;
    padding: 15px 10px;
}

.sidebar .nav-section {
    padding: 10px 15px;
    font-size: 11px;
    font-weight: 700;
    color: #a1a2a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar .nav-item {
    margin-bottom: 5px;
}

.sidebar .nav-item a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #575962;
    border-radius: 5px;
    font-weight: 500;
}

.sidebar .nav-item a:hover {
    background: rgba(0,0,0,0.03);
    color: var(--primary);
}

.sidebar .nav-item.active a {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.sidebar .nav-item a i {
    font-size: 18px;
    margin-right: 15px;
    width: 25px;
    text-align: center;
}

.sidebar .nav-item a p {
    margin: 0;
    font-size: 14px;
}

/* ==========================================================================
   5. CARDS & WIDGETS
   ========================================================================== */
.card {
    border: 0;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #ebedf2;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid #ebedf2;
    padding: 1rem 1.5rem;
}

/* Stats Card (Dashboard) */
.card-stats .icon-big {
    font-size: 3rem;
    color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-stats .icon-primary { color: var(--primary); }
.card-stats .icon-info { color: var(--info); }
.card-stats .icon-success { color: var(--primary); }
.card-stats .icon-warning { color: var(--warning); }
.card-stats .icon-danger { color: var(--danger); }

.card-stats .numbers {
    text-align: right;
}

.card-stats .card-category {
    color: #888;
    font-size: 13px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.card-stats .card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 0;
}

/* ==========================================================================
   6. LOGIN PAGE
   ========================================================================== */
body.login {
    background: linear-gradient(135deg, var(--primary) 0%, #155724 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapper-login {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container-login {
    background: #fff;
    width: 400px;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
}

.container-login h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
    font-weight: 700;
}

.login-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

.login-form .placeholder {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    display: block;
}

.login-form .form-control {
    height: 45px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
}

.login-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.login-form .show-password {
    position: absolute;
    right: 15px;
    top: 38px;
    cursor: pointer;
    color: #999;
}

.login-form .btn-primary {
    width: 100%;
    height: 45px;
    font-weight: bold;
    font-size: 16px;
    margin-top: 10px;
    background: var(--primary);
    border: none;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.login-form .btn-primary:hover {
    background: var(--primary-dark);
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer {
    border-top: 1px solid #eee;
    padding: 15px 0;
    background: #fff;
    width: 100%;
    position: absolute;
    bottom: 0;
}

.footer .copyright {
    text-align: center;
    color: #777;
    font-size: 13px;
}

/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-panel {
        width: 100%;
    }
    
    .sidebar.toggled {
        transform: translateX(0);
    }
}
