/* Owlio Theme Redesign */
:root {
    --primary-color: #2b5ce7;
    /* Bright Blue */
    --secondary-color: #a3aed0;
    /* Gray Blue Text */
    --bg-color: #f4f7fe;
    /* Light Blue-Gray Background */
    --surface-color: #ffffff;
    --text-color: #1b2559;
    --danger-color: #ee5d50;
    --success-color: #05cd99;
    --warning-color: #ffce20;
    --border-radius: 20px;
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    /* Prevent body scroll, use inner scroll */
    height: 100vh;
}

/* Layout Structure */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface-color);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    box-sizing: border-box;
    transition: all var(--transition-speed);
}

.brand-logo {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    padding-left: 10px;
    color: var(--text-color);
    font-size: 24px;
    font-weight: 700;
}

.brand-logo i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 28px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    /* Custom Scrollbar for ease of use and aesthetics */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.nav-menu::-webkit-scrollbar {
    width: 6px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.nav-menu::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.nav-item {
    margin-bottom: 15px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 12px;
    /* Close to Owlio style */
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link i {
    margin-right: 15px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 10px 20px -10px var(--primary-color);
}

.sidebar-footer {
    margin-top: auto;
}

.upgrade-card {
    background: linear-gradient(135deg, #868CFF 0%, #4318FF 100%);
    border-radius: 20px;
    padding: 20px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.upgrade-card h4 {
    margin: 10px 0 5px;
    font-size: 16px;
}

.upgrade-card p {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 15px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Top Header */
.top-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background-color: rgba(244, 247, 254, 0.5);
    /* Transparent-ish */
    backdrop-filter: blur(10px);
    z-index: 10;
}

.breadcrumb {
    font-size: 14px;
    color: var(--secondary-color);
}

.page-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface-color);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 18px 40px -12px rgba(220, 225, 246, 0.45);
}

.search-bar {
    background: #f4f7fe;
    border-radius: 30px;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-family: inherit;
    width: 200px;
}

.icon-btn {
    color: var(--secondary-color);
    font-size: 20px;
    cursor: pointer;
    background: none;
    border: none;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Scrollable Content */
.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Shared Components */
.card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 20px 40px rgba(112, 144, 176, 0.08);
    /* Soft shadow */
    margin-bottom: 30px;
    border: none;
}

.card h2,
.card h3 {
    margin-top: 0;
    color: var(--text-color);
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #244bc5;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Grid/Table Styles for Modern Look */
.grid-view {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: none;
}

.grid-view th {
    text-align: left;
    color: var(--secondary-color);
    font-weight: 500;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    font-size: 14px;
    background: transparent;
}

.grid-view td {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
}

.grid-view tr:last-child td {
    border-bottom: none;
}

.grid-view tr:hover td {
    background-color: #fafbfc;
}

/* Form Controls */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid #e0e5f2;
    background-color: #fff;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-color);
    box-sizing: border-box;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Dashboard Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 20px 40px rgba(112, 144, 176, 0.08);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #f4f7fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 24px;
    margin-right: 15px;
}

.stat-info h4 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 500;
}

.stat-info .value {
    margin: 5px 0 0;
    color: var(--text-color);
    font-size: 24px;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }

    .brand-logo span,
    .nav-link span,
    .upgrade-card,
    .sidebar-footer {
        display: none;
    }

    .nav-link {
        justify-content: center;
        padding: 15px;
    }

    .nav-link i {
        margin: 0;
        font-size: 24px;
    }
}