/* assets/css/app.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0066ff;
    /* Vivid Blue */
    --primary-light: #e6f0ff;
    --text-color: #334155;
    --text-muted: #94a3b8;
    --bg-body: #f1f5f9;
    /* Light Blue-Gray */
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --border-radius: 16px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-color);
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Layout Wrapper */
.wrapper {
    display: flex;
    width: 100%;
}

/* Sidebar */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 100;
    transition: all 0.3s ease;
    padding: 20px 0;
}

#sidebar.collapsed {
    min-width: var(--sidebar-collapsed-width);
    max-width: var(--sidebar-collapsed-width);
}

#sidebar .sidebar-header {
    padding: 0 24px 30px 24px;
    display: flex;
    align-items: center;
}

#sidebar .sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.brand-imobisis {
    color: var(--primary-color);
}

/* Sidebar Sections */
.sidebar-section {
    padding: 0 24px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

#sidebar.collapsed .sidebar-header h3,
#sidebar.collapsed .sidebar-section-title,
#sidebar.collapsed .brand-imobisis {
    display: none;
}

#sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0 0 30px 0;
}

#sidebar.collapsed .sidebar-header::after {
    content: 'IS';
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Header for collapsed items to fix spacing */
#sidebar.collapsed .sidebar-section {
    padding: 0;
    margin-top: 10px;
    text-align: center;
}

#sidebar.collapsed .sidebar-section::before {
    content: '•';
    color: var(--text-muted);
}


#sidebar ul.components {
    padding: 0 12px;
    list-style: none;
}

#sidebar ul li {
    margin-bottom: 4px;
}

#sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}

#sidebar ul li a i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 12px;
    color: #64748b;
    text-align: center;
}

#sidebar ul li a:hover {
    background-color: var(--bg-body);
    color: #0f172a;
}

#sidebar ul li a:hover i {
    color: #0f172a;
}

#sidebar ul li.active>a {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 102, 255, 0.25);
}

#sidebar ul li.active>a i {
    color: #fff;
}

/* Collapsed Links */
#sidebar.collapsed ul.components {
    padding: 0 10px;
}

#sidebar.collapsed ul li a {
    justify-content: center;
    padding: 12px 0;
}

#sidebar.collapsed ul li a span {
    display: none;
}

#sidebar.collapsed ul li a i {
    margin-right: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #f1f5f9;
}

/* Content Area */
#content {
    width: 100%;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 30px;
    transition: all 0.3s ease;
}

#content.collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Navbar (Floating Card) */
.topbar {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 12px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar .navbar-brand img {
    height: 32px;
}

/* Cards */
.card,
.glass-card {
    background: #fff;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    color: var(--text-color);
}

.glass-card h4 {
    font-weight: 600;
    color: #0f172a;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Stats Cards */
.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box i {
    font-size: 1.25rem;
}

.text-muted {
    color: #64748b !important;
}

h2.fw-bold {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Forms */
.form-control,
.form-select {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    color: #0f172a;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: none;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #005ce6;
    border-color: #005ce6;
}

.btn-glass {
    background-color: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.btn-glass:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.table thead th:first-child {
    border-top-left-radius: 10px;
}

.table thead th:last-child {
    border-top-right-radius: 10px;
}

.table tbody td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Login */
.auth-wrapper {
    background-color: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-card {
    background: #fff;
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 20px;

    /* Sidebar Footer Collapsed */
    #sidebar.collapsed .sidebar-footer {
        padding: 20px 10px;
    }

    #sidebar.collapsed .sidebar-footer .btn {
        padding: 10px 0;
    }

}

/* Sidebar Footer Collapsed */
#sidebar.collapsed .sidebar-footer {
    padding: 20px 10px;
}

#sidebar.collapsed .sidebar-footer .btn {
    padding: 10px 0;
}

#sidebar.collapsed .sidebar-footer .btn i {
    margin-right: 0 !important;
}

#sidebar.collapsed .logout-text,
#sidebar.collapsed .sidebar-version {
    display: none !important;
}