/* --- Premium Modern Design System --- */

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

:root {
    --primary: #4361ee;
    --primary-rgb: 67, 97, 238;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #ff9e00;
    --info: #480ca8;
    --dark: #1e1e2d;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray-100: #f1f1f4;
    --gray-200: #dbdbdf;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,.04);
    --shadow: 0 10px 30px 0 rgba(82,63,105,.05);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Outfit', sans-serif !important;
    background-color: #f4f7f6 !important;
    color: var(--dark);
    font-size: 14px; /* Reduced from 15px */
}

/* AdminLTE Overrides */
.wrapper, .main-sidebar, .left-side {
    background-color: var(--dark) !important;
}

.main-header .navbar {
    background-color: var(--white) !important;
    border-bottom: 1px solid var(--gray-100) !important;
    box-shadow: var(--shadow-sm);
}

.main-header .navbar .nav > li > a {
    color: var(--dark) !important;
}

.main-sidebar {
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar-menu > li.header {
    color: #4b4b5a !important;
    background: transparent !important;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 15px 25px 5px !important;
}

.sidebar-menu > li > a {
    padding: 12px 20px 12px 25px !important;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-menu > li:hover > a, .sidebar-menu > li.active > a {
    background: rgba(255,255,255,0.05) !important;
    color: var(--white) !important;
    border-left-color: var(--primary) !important;
}

/* Content Area */
.content-wrapper {
    background-color: #f4f7f6 !important;
    padding: 20px;
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 10px !important;
    }
}

.content-header h1 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
}

/* Boxes/Cards */
.box {
    border: none !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow) !important;
    margin-bottom: 30px;
    transition: var(--transition);
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px 0 rgba(82,63,105,.1) !important;
}

.box-header {
    border-bottom: 1px solid var(--gray-100) !important;
    padding: 15px 20px !important;
}

.box-title {
    font-weight: 600 !important;
    color: var(--dark) !important;
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background-color: var(--gray-100) !important;
    color: #5e6278 !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border: none !important;
    padding: 15px !important;
}

.table tbody td {
    padding: 10px 12px !important; /* Reduced from 15px */
    vertical-align: middle !important;
    border-bottom: 1px solid var(--gray-100);
}

/* Buttons - More Compact */
.btn {
    border-radius: 6px !important; /* Smaller radius */
    font-weight: 500 !important;
    padding: 6px 15px !important; /* Reduced padding */
    transition: var(--transition) !important;
    border: none !important;
    font-size: 13px !important; /* Smaller font */
}

.btn-primary { background-color: var(--primary) !important; box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3) !important; }
.btn-success { background-color: var(--success) !important; box-shadow: 0 4px 10px rgba(76, 201, 240, 0.3) !important; }
.btn-danger { background-color: var(--danger) !important; box-shadow: 0 4px 10px rgba(247, 37, 133, 0.3) !important; }
.btn-info { background-color: var(--info) !important; box-shadow: 0 4px 10px rgba(72, 12, 168, 0.3) !important; }

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Forms */
/* Forms - More Compact */
.form-control {
    border-radius: 6px !important;
    font-size: 13px !important;
    padding: 8px 12px !important;
    height: auto !important;
    box-shadow: none !important;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary) !important;
    background-color: var(--white) !important;
}

/* Custom Utilities */
.text-primary { color: var(--primary) !important; }
.bg-gradient-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)) !important; color: white; }

/* Dashboard Cards */
.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

@media (max-width: 576px) {
    .stats-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    .stats-icon {
        margin-right: 0 !important;
        margin-bottom: 10px;
    }
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
}

.stats-data .number {
    font-size: 24px;
    font-weight: 700;
    display: block;
}

.stats-data .stats-label {
    color: #7e8299;
    font-size: 14px;
    display: block;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.login-page {
    background: linear-gradient(135deg, #1e1e2d 0%, #3f37c9 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(67, 97, 238, 0.4);
    filter: blur(80px);
    border-radius: 50%;
    top: -100px;
    right: -50px;
    z-index: 0;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(247, 37, 133, 0.2);
    filter: blur(100px);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    z-index: 0;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    animation: fadeInScale 0.6s ease-out;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
        border-radius: 16px;
    }
    .login-header h2 {
        font-size: 22px;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-weight: 700;
    font-size: 28px;
    color: var(--dark);
    margin: 0;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #7e8299;
    margin-top: 10px;
    font-size: 15px;
}

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

.login-form .form-control {
    background: var(--light) !important;
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    padding: 12px 15px 12px 45px !important;
    font-size: 15px;
}

.login-form .form-control:focus {
    border-color: var(--primary) !important;
    background: var(--white) !important;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1) !important;
}

.login-form .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a5b7;
    font-size: 18px;
    z-index: 5;
    transition: var(--transition);
}

.login-form .form-group:focus-within .input-icon {
    color: var(--primary);
}

.btn-login {
    width: 100%;
    padding: 14px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    margin-top: 10px;
    background: linear-gradient(to right, var(--primary), var(--secondary)) !important;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.2) !important;
    color: white !important;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(67, 97, 238, 0.3) !important;
}

.remember-me {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 14px;
    color: #7e8299;
}

.remember-me label {
    font-weight: 400;
    cursor: pointer;
    margin: 0;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Fix for Yii2 ActiveForm validation errors */
.help-block {
    font-size: 12px;
    color: var(--danger);
    margin-top: 5px;
}

.has-error .form-control {
    border-color: var(--danger) !important;
}
