/* Modern OBE Cloud Custom Styling */

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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --bg-sidebar: #ffffff;
    --bg-main: #f4f7fb;
    --border-color: #eaeff5;
    --text-muted: #8b98a9;
    --text-dark: #0f172a;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --sidebar-text: #64748b;
    --sidebar-text-hover: var(--primary-hover);
    --sidebar-icon: var(--primary-color);
    --sidebar-brand: var(--text-dark);
    
    /* Modern UI Variables */
    --shadow-soft: 0 20px 40px -15px rgba(0,0,0,0.05);
    --shadow-sm: 0 4px 20px rgba(0,0,0,0.03);
    --radius-lg: 1.25rem;
    --radius-md: 0.85rem;
    --radius-sm: 0.5rem;
}

[data-theme="ocean"] {
    --primary-color: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;
}

[data-theme="emerald"] {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --primary-light: #d1fae5;
}

[data-theme="crimson"] {
    --primary-color: #e11d48;
    --primary-hover: #be123c;
    --primary-light: #ffe4e6;
}

[data-theme="midnight"] {
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: #1e3a8a;
    --bg-sidebar: #0f172a;
    --bg-main: #020617;
    --border-color: #1e293b;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    
    --sidebar-text: #94a3b8;
    --sidebar-text-hover: #ffffff;
    --sidebar-brand: #f8fafc;
    --shadow-soft: 0 20px 40px -15px rgba(0,0,0,0.4);
    --shadow-sm: 0 4px 20px rgba(0,0,0,0.2);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-dark);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Sidebar Styling */
.sidebar {
    width: 270px;
    height: calc(100vh - 2rem);
    position: fixed;
    top: 1rem;
    left: 1rem;
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1rem;
    z-index: 1000;
    overflow-y: auto;
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.1);
    border-radius: 4px;
}
[data-theme="midnight"] .sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sidebar-brand);
    margin-bottom: 2rem;
    padding-left: 0.5rem;
    transition: color 0.4s ease;
}

.sidebar-brand i {
    color: var(--sidebar-icon);
    font-size: 1.5rem;
}

.menu-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.25s ease;
    margin-bottom: 0.25rem;
}

.nav-link-custom:hover {
    background-color: var(--primary-light);
    color: var(--sidebar-text-hover);
    transform: translateX(3px);
}
[data-theme="midnight"] .nav-link-custom:hover {
    background-color: rgba(255,255,255,0.08);
}

.nav-link-custom.active {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
[data-theme="midnight"] .nav-link-custom.active {
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.nav-link-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-link-inner i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Submenu Styling */
.submenu {
    list-style: none;
    padding-left: 2rem;
    margin-bottom: 0.5rem;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: var(--sidebar-text);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.submenu-link::before {
    content: "";
    width: 6px;
    height: 6px;
    border: 1.5px solid var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.submenu-link:hover {
    color: var(--sidebar-text-hover);
    transform: translateX(3px);
}

.submenu-link:hover::before {
    border-color: var(--sidebar-text-hover);
    background-color: var(--sidebar-text-hover);
}

.submenu-link.active {
    color: var(--sidebar-text-hover);
    font-weight: 600;
}

.submenu-link.active::before {
    border-color: var(--sidebar-text-hover);
    background-color: var(--sidebar-text-hover);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Main Content Area */
.main-wrapper {
    margin-left: calc(270px + 2rem);
    min-height: 100vh;
    padding: 1rem 2rem 2rem 0;
}

/* Top Navbar */
.top-navbar {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 1rem;
    z-index: 900;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}
[data-theme="midnight"] .top-navbar {
    background: rgba(15, 23, 42, 0.75);
}

.top-navbar-tabs {
    display: flex;
    gap: 0.5rem;
}

.top-tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-tab:hover {
    color: var(--primary-hover);
}

.top-tab.active {
    background-color: var(--primary-color);
    color: #ffffff;
}

.top-navbar-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.action-icon-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.action-icon-btn:hover {
    color: var(--primary-hover);
    background-color: #f1f5f9;
}

.user-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

/* Dashboard Stat Cards */
.stat-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.stat-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Badges */
.badge-custom {
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-success-soft {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning-soft {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger-soft {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info-soft {
    background-color: #e0f2fe;
    color: #075985;
}

.icon-box {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon-orange {
    background-color: #fff7ed;
    color: #f97316;
}

.stat-icon-green {
    background-color: #f0fdf4;
    color: #22c55e;
}

.stat-icon-blue {
    background-color: #f0f9ff;
    color: #0ea5e9;
}

.stat-icon-purple {
    background-color: #faf5ff;
    color: #a855f7;
}

.stat-icon-red {
    background-color: #fef2f2;
    color: #ef4444;
}

.stat-icon-gray {
    background-color: #f8fafc;
    color: #64748b;
}

/* Custom Cards */
.custom-card {
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.4s ease;
}

.custom-card:hover {
    box-shadow: var(--shadow-soft);
}
[data-theme="midnight"] .custom-card {
    border-color: rgba(255,255,255,0.05);
}

.custom-card-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.custom-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.custom-card-body {
    padding: 1.5rem;
}

/* Custom Tabs */
.custom-nav-tabs {
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    list-style: none;
    padding-left: 0;
}

.custom-tab-btn {
    border: none;
    background: none;
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    cursor: pointer;
    transition: color 0.2s ease;
}

.custom-tab-btn:hover, .custom-tab-btn.active {
    color: var(--primary-color);
}

.custom-tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

/* Action Buttons */
.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Tables */
.table-custom {
    width: 100%;
    margin-bottom: 1rem;
    vertical-align: middle;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom th {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.015);
}
[data-theme="midnight"] .table-custom th {
    background-color: rgba(255,255,255,0.02);
}

.table-custom td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: background-color 0.2s ease;
}

.table-custom tr {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.table-custom tbody tr:hover td {
    background-color: rgba(0,0,0,0.01);
}
[data-theme="midnight"] .table-custom tbody tr:hover td {
    background-color: rgba(255,255,255,0.03);
}

/* Make table rows slightly elevated on hover */
.table-custom tbody tr:hover {
    transform: scale(1.001);
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

/* Badges */
.badge-custom {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
}

.badge-custom-success {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-custom-warning {
    background-color: #fef9c3;
    color: #a16207;
}

.badge-custom-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.badge-custom-primary {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.badge-custom-purple {
    background-color: #f3e8ff;
    color: #6b21a8;
}

.badge-custom-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

/* Pagination */
.pagination-custom {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.page-item-custom a, .page-item-custom span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.page-item-custom a:hover {
    background-color: #f1f5f9;
    color: var(--primary-hover);
}

.page-item-custom.active a, .page-item-custom.active span {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.page-item-custom.disabled span {
    color: #cbd5e1;
    cursor: not-allowed;
    background-color: #f8fafc;
}

/* New Button Utilities */
.btn-light-green {
    background-color: #dcfce7;
    color: #15803d;
    border: none;
    transition: all 0.2s;
}
.btn-light-green:hover {
    background-color: #bbf7d0;
    color: #166534;
}

.btn-light-orange {
    background-color: #ffedd5;
    color: #c2410c;
    border: none;
    transition: all 0.2s;
}
.btn-light-orange:hover {
    background-color: #fed7aa;
    color: #9a3412;
}

.btn-light-blue {
    background-color: #e0f2fe;
    color: #0369a1;
    border: none;
    transition: all 0.2s;
}
.btn-light-blue:hover {
    background-color: #bae6fd;
    color: #075985;
}

.btn-light-gray {
    background-color: #f1f5f9;
    color: #475569;
    border: none;
    transition: all 0.2s;
}
.btn-light-gray:hover {
    background-color: #e2e8f0;
    color: #334155;
}
