/**
 * MODERN SAAS THEME - Trendy Minimalist Design
 * Created: 2026-02-13
 * Purpose: Override AdminLTE styles with modern, clean SaaS aesthetics
 */

/* ===================================================================
   MODERN FONT & TYPOGRAPHY
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@400;500;600;700&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

h1, h2, h3, h4, h5, h6, .box-title {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ===================================================================
   MODERN BUTTON STYLES - Calm & Professional
   =================================================================== */
.btn {
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    padding: 9px 18px;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-transform: none;
    letter-spacing: -0.01em;
}

.btn:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
}

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

.btn-success:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

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

.btn-danger:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

.btn-default {
    background: #ffffff !important;
    border-color: #d1d5db !important;
    color: #374151 !important;
}

.btn-default:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
}

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

.btn-block {
    border-radius: 10px !important;
    padding: 12px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* ===================================================================
   LOGIN PAGE - Simple Centered Minimalist Design (Stripe-style)
   =================================================================== */
.login-page, .register-page {
    background: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Remove any background pseudo-element */
body.home:before,
body.home:after,
.login-page:before,
.login-page:after,
.register-page:before,
.register-page:after {
    display: none !important;
    content: none !important;
    background: none !important;
}

.login-box, .register-box {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 20px;
}

.login-box-body, .register-box-body {
    background: #ffffff !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.login-logo, .register-logo {
    margin-bottom: 48px;
    text-align: center;
}

.login-logo a, .register-logo a {
    display: inline-block;
    text-decoration: none;
}

.login-logo img, .register-logo img {
    width: auto !important;
    height: 56px !important;
    max-width: 200px !important;
    object-fit: contain;
}

.login-box-msg {
    font-size: 15px !important;
    color: #6b7280 !important;
    margin-bottom: 30px !important;
    font-weight: 400 !important;
    text-align: center !important;
    display: block !important;
}

/* Modern Form Inputs - Calm & Professional */
.form-control {
    border-radius: 6px !important;
    border: 1px solid #d1d5db !important;
    padding: 3px 12px !important;
    font-size: 14px !important;
    transition: all 0.15s ease !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    color: #1f2937 !important;
}

.form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
    outline: none !important;
    background: #ffffff !important;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f9fafb !important;
    color: #9ca3af !important;
}

.login-page .form-control,
.register-page .form-control {
    padding: 11px 14px !important;
    font-size: 15px !important;
}

.login-page .form-group,
.register-page .form-group {
    margin-bottom: 16px;
}

.login-page .has-feedback .form-control,
.register-page .has-feedback .form-control {
    padding-right: 14px !important;
}

/* Hide feedback icons for cleaner look */
.login-page .form-control-feedback,
.register-page .form-control-feedback {
    display: none !important;
}

/* ===================================================================
   LOGIN PAGE BUTTONS - Simple & Minimal
   =================================================================== */
.login-page .btn-primary,
.register-page .btn-primary {
    background: #0a0a0a !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 11px 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.login-page .btn-primary:hover,
.register-page .btn-primary:hover {
    background: #262626 !important;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.login-page .btn-primary:active,
.register-page .btn-primary:active {
    background: #171717 !important;
}

/* Google Sign-In Button - Minimal Design */
.btn-google {
    background: #ffffff !important;
    color: #0a0a0a !important;
    border: 1px solid #d1d5db !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500 !important;
    padding: 11px 16px !important;
    margin-top: 12px;
    border-radius: 6px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.15s ease !important;
}

.btn-google:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transform: none !important;
}

.btn-google svg {
    width: 18px;
    height: 18px;
}

/* Divider - OR text between buttons */
.login-page .divider,
.register-page .divider {
    display: flex !important;
    align-items: center;
    text-align: center;
    margin: 16px 0 !important;
    color: #6b7280 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.login-page .divider::before,
.login-page .divider::after,
.register-page .divider::before,
.register-page .divider::after {
    content: '' !important;
    flex: 1;
    border-bottom: 1px solid #d1d5db !important;
}

.login-page .divider span,
.register-page .divider span {
    padding: 0 12px !important;
    background: #ffffff;
}

/* Links styling */
.login-page a,
.register-page a {
    color: #2563eb !important;
    text-decoration: none !important;
    font-size: 14px !important;
}

.login-page a:hover,
.register-page a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

/* ===================================================================
   HEADER - Modern & Clean
   =================================================================== */
header.main-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.main-header .logo {
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
}

.main-header .logo:hover {
    background: #f8fafc !important;
}

.skin-yellow-light .main-header .navbar {
    background-color: #ffffff !important;
}

.skin-yellow-light .main-header .navbar .nav>li>a {
    color: #334155 !important;
    font-weight: 500;
}

.skin-yellow-light .main-header .navbar .nav>li>a:hover {
    background-color: #f1f5f9 !important;
}

/* Credit Zone - Modern Badge */
a.creditZone {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    border: 2px solid #f59e0b !important;
    color: #92400e !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
}

a.creditZone:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

a.creditZone span {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    padding: 4px 12px !important;
    border-radius: 12px !important;
    margin-left: 8px !important;
}

/* ===================================================================
   SIDEBAR - Modern Navigation
   =================================================================== */
.skin-yellow-light .wrapper,
.skin-yellow-light .main-sidebar,
.skin-yellow-light .left-side {
    background: #ffffff !important;
}

.main-sidebar {
    border-right: 1px solid #e5e7eb !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03) !important;
    transition: padding-top 0.3s ease;
}

/* Add padding when pending alert bar is shown */
body.has-pending-alert .main-sidebar {
    padding-top: 52px;
}

.sidebar-menu > li > a {
    border-radius: 10px !important;
    margin: 4px 0 !important;
    padding: 12px 16px !important;
    transition: all 0.2s ease !important;
    color: #475569 !important;
}

.sidebar-menu > li:hover > a {
    background: #f3f4f6 !important;
    color: #374151 !important;
}

.sidebar-menu > li.active > a {
    background: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.5) !important;
}

/* Sidebar Collapsed State - Fix Icon Display */
.sidebar-collapse .main-sidebar {
    overflow: visible !important;
}

.sidebar-collapse .sidebar-menu > li > a {
    padding: 12px 15px !important;
    text-align: center !important;
}

.sidebar-collapse .sidebar-menu > li > a > .fa,
.sidebar-collapse .sidebar-menu > li > a > .glyphicon,
.sidebar-collapse .sidebar-menu > li > a > .ion {
    display: block !important;
    margin: 0 auto !important;
    font-size: 18px !important;
    width: auto !important;
}

.sidebar-collapse .sidebar-menu > li > a > span {
    display: none !important;
}

/* Ensure sidebar items are properly sized when collapsed */
.sidebar-collapse .sidebar-menu > li {
    position: relative;
}

.sidebar-collapse .sidebar-menu > li > a {
    border-radius: 6px !important;
    margin: 4px 8px !important;
}

/* Fix hover tooltips when collapsed */
.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right),
.sidebar-collapse .sidebar-menu > .treeview-menu {
    display: block !important;
}

/* ===================================================================
   CONTENT AREA - Clean & Spacious
   =================================================================== */
.content-wrapper {
    background: #f8fafc !important;
    border-radius: 0 !important;
}

.box {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    background: #ffffff;
}

.box-header {
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 20px !important;
}

.box-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

.box-body {
    padding: 25px !important;
}

.box.box-primary {
    border-top: 3px solid #6366f1 !important;
}

/* ===================================================================
   TABLES - Calm & Professional
   =================================================================== */
.table {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.table thead th {
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
    color: #6b7280 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 12px 16px !important;
}

.table tbody td {
    padding: 12px 16px !important;
    color: #374151 !important;
    font-size: 14px !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: #f9fafb !important;
}

.table tbody tr:last-child td {
    border-bottom: none !important;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #ffffff !important;
}

.table-striped > tbody > tr:nth-of-type(even) {
    background-color: #fafbfc !important;
}

/* ===================================================================
   FOOTER - Minimal & Clean
   =================================================================== */
.main-footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 15px !important;
    color: #64748b !important;
    font-size: 13px !important;
}

/* ===================================================================
   SMALL BOXES (Dashboard) - Calm Cards
   =================================================================== */
.small-box {
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.15s ease !important;
}

.small-box:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07) !important;
}

.small-box .inner h3 {
    color: #0a0a0a !important;
    font-size: 32px !important;
    font-weight: 700 !important;
}

.small-box .inner p {
    color: #6b7280 !important;
    font-size: 14px !important;
}

.small-box .icon {
    color: rgba(99, 102, 241, 0.15) !important;
}

.small-box > a.small-box-footer {
    background-color: #f9fafb !important;
    color: #6366f1 !important;
    border-top: 1px solid #e5e7eb !important;
    font-weight: 500 !important;
}

.small-box > a.small-box-footer:hover {
    background-color: #f3f4f6 !important;
    color: #4f46e5 !important;
}

/* ===================================================================
   FORMS & MODALS - Clean & Modern
   =================================================================== */
.modal-content {
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 20px 25px !important;
}

.modal-title {
    font-weight: 600 !important;
    color: #1e293b !important;
}

.modal-body {
    padding: 25px !important;
}

.modal-footer {
    border-top: 1px solid #e2e8f0 !important;
    padding: 15px 25px !important;
}

/* ===================================================================
   RESPONSIVE IMPROVEMENTS
   =================================================================== */
@media (max-width: 768px) {
    .login-page, .register-page {
        padding: 20px;
    }

    .login-box, .register-box {
        max-width: 100%;
    }

    .login-logo img, .register-logo img {
        width: auto !important;
        height: 48px !important;
        max-width: 180px !important;
    }

    .content-wrapper {
        padding: 15px !important;
    }
}

/* ===================================================================
   UTILITY CLASSES
   =================================================================== */
.shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important; }
.shadow-md { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important; }
.shadow-lg { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important; }

.rounded-lg { border-radius: 12px !important; }
.rounded-xl { border-radius: 16px !important; }

.bg-gradient-primary { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important; }
.bg-gradient-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; }
.bg-gradient-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important; }
