/* --- Retailer / Account Dashboard (Added) --- */
.retailer-page {
    padding: 40px 0 80px;
    background: var(--gray-50);
    min-height: calc(100vh - 80px);
    /* Adjust based on header */
}

.retailer-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar */
.account-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    position: sticky;
    top: 100px;
    /* Offset for sticky header */
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-100);
}

.user-avatar {
    font-size: 48px;
    width: 90px;
    height: 90px;
    background: var(--gray-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 1px solid var(--gray-200);
}

.user-avatar-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.user-profile h3 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--gray-900);
}

.user-profile p {
    font-size: 13px;
    color: var(--success);
    font-weight: 600;
    background: #dcfce7;
    padding: 4px 12px;
    border-radius: 20px;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.account-nav a {
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--gray-600);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 15px;
}

.account-nav a:hover {
    background: var(--gray-50);
    color: var(--primary);
    transform: translateX(4px);
}

.account-nav a.active {
    background: #eff6ff;
    /* blue-50 */
    color: #1d4ed8;
    /* blue-700 */
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Dashboard Header */
.account-header {
    margin-bottom: 32px;
}

.account-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.account-header p {
    color: var(--gray-500);
    font-size: 16px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-box {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-val {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Forms & Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--gray-100);
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 18px;
    margin: 0;
    color: var(--gray-800);
}

.card-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-900);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid var(--gray-300);
    appearance: none;
    border-radius: var(--radius);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.form-control:focus {
    color: var(--gray-900);
    background-color: var(--white);
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Image Upload Area */
.image-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.image-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-upload-area .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    white-space: nowrap;
}

.data-table th {
    background: var(--gray-50);
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-500);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-700);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--gray-50);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-badge.draft {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Responsive */
@media (max-width: 992px) {
    .retailer-grid {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
        margin-bottom: 30px;
    }
}
/* Alerts */
.alert { padding: 16px 20px; border-radius: 8px; border-left: 4px solid; margin-bottom: 24px; }
.alert-info { background: rgba(59, 130, 246, 0.1); border-left-color: #3b82f6; color: #1e40af; }
