/* aily B2B Platform - Main Styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --sidebar-width: 260px;
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --body-bg: #f1f5f9;
}

body {
    background: var(--body-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar .brand {
    padding: 1.25rem 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.6rem 1rem;
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
    transition: background 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 0.5rem;
}

.sidebar .nav-section {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    padding: 1rem 1rem 0.25rem;
    letter-spacing: 0.05em;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
}

.top-bar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.content-area {
    padding: 1.5rem;
}

/* Sidebar Toggle (Mobile) */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-radius: 0.5rem;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

/* Stats Cards */
.stat-card {
    padding: 1.25rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.875rem;
    color: #64748b;
    border-bottom-width: 1px;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sidebar-bg), var(--primary-dark));
}

.login-card {
    width: 100%;
    max-width: 420px;
}

/* Wizard Progress */
.wizard-step { transition: opacity 0.3s; }

/* Alert dismissable animation */
.alert { border-radius: 0.5rem; }

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1035;
        display: none;
    }
    .sidebar-backdrop.show {
        display: block;
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: inline-block;
    }
}

@media (max-width: 575.98px) {
    .content-area {
        padding: 1rem;
    }
}
