/* /business/css/business.css */

/* =================================
   BUSINESS DASHBOARD LAYOUT
   ================================= */
body {
    background-color: #f8fafc;
}

.dashboard-container {
    display: flex;
    width: 100%;
}

.sidebar {
    /* Styles are in /business/_components/Sidebar/Sidebar.css */
    /* This file just handles the interaction */
    height: 100vh;
}

.main-content {
    flex-grow: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 25px; /* Added padding for new "card" layout */
    transition: margin-inline-start 0.3s ease;
}

.main-content-inner {
    padding: 30px;
    /* Updated for new design */
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* --- Desktop Layout (Sidebar interaction) --- */
@media (min-width: 992px) {
    [dir="ltr"] .main-content { margin-left: 260px; }
    [dir="rtl"] .main-content { margin-right: 260px; }

    [dir="ltr"] body.sidebar-collapsed .main-content { margin-left: 80px; }
    [dir="rtl"] body.sidebar-collapsed .main-content { margin-right: 80px; }
}

/* --- Mobile Layout (Sidebar interaction) --- */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
body.sidebar-mobile-open .sidebar-overlay {
    display: block;
    opacity: 1;
}
@media (max-width: 991px) {
    [dir="ltr"] .main-content { margin-left: 0; }
    [dir="rtl"] .main-content { margin-right: 0; }
    .main-content {
        padding: 15px; /* Less padding on mobile */
    }
    .main-content-inner {
        padding: 20px 15px;
    }
}


/* =================================
   NEW & SHARED COMPONENTS
   ================================= */

/* --- Page Header (Replaces old header title) --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}
.page-header-left h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}
.page-header-left p {
    margin: 5px 0 0;
    color: #7f8c8d;
    font-size: 16px;
}
.page-header-right {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    margin-inline-start: 20px;
}


/* --- Cards --- */
.card {
    background: #ffffff;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    padding: 20px 25px;
}
.card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.card .card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-dark);
}

/* --- Grids --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

/* --- Buttons --- */
.btn-primary-action {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.btn-primary-action:hover {
    background: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}
.btn-secondary {
    background: #ecf0f1;
    color: var(--text-dark);
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-secondary:hover {
    background-color: #dfe6e9;
    border-color: #bdc3c7;
}
.btn-danger {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}
.btn-danger:hover {
    background-color: #c0392b;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 25px;
}
.form-group:last-child {
    margin-bottom: 0;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-size: 14px;
    box-sizing: border-box;
}
.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}
.help-text {
    font-size: 13px;
    color: #7f8c8d;
    margin: 8px 0 0 0;
}

/* --- Status Badge (Moved from users.css) --- */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}
.status-badge.active { background-color: #eafaf1; color: #2ecc71; }
.status-badge.pending { background-color: #fef5e7; color: #f39c12; }
.status-badge.inactive { background-color: #f4f6f7; color: #95a5a6; }
.status-badge.expired { background-color: #fef2f2; color: #e74c3c; }


/* =================================
   MOBILE-SPECIFIC ADJUSTMENTS
   ================================= */
@media (max-width: 767px) {
    .main-content-inner {
        padding: 15px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .page-header-left h1 {
        font-size: 24px;
    }

    .page-header-right {
        margin-inline-start: 0;
        width: 100%;
    }

    .btn-primary-action {
        width: 100%;
        justify-content: center;
    }

    .card {
        padding: 15px;
    }
}