/* Rajasthan Chai POS System - Bootstrap Enhanced */

/* Import Bootstrap and Custom Fonts */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600&display=swap');

/* Base Styles */
:root {
    --bg-primary: #252836;
    --bg-secondary: #1F1D2B;
    --bg-tertiary: #2D303E;
    --border-color: #393C49;
    --accent-color: #EA7C69;
    --text-primary: #FFFFFF;
    --text-secondary: #ABBBC2;
    --text-muted: #889898;
    --text-light: #E0E6E9;
}

body {
    font-family: 'Barlow', sans-serif;
    background-color: var(--bg-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Layout Components */
.main-container {
    position: relative;
    background: var(--bg-primary);
    border-radius: 16px;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 104px;
    height: 100vh;
    background: var(--bg-secondary);
    border-radius: 16px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-logo {
    width: 80px;
    height: 80px;
    margin: 24px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo .nav-item {
    width: 80px;
    height: 80px;
    background: rgba(235, 150, 106, 0.26);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.sidebar-logo .nav-item.active {
    background: var(--accent-color);
}

.sidebar-nav {
    margin-top: 40px;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-item {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.nav-item:not(.active) {
    background: rgba(234, 124, 105, 0.1);
}

.nav-item.active {
    background: var(--accent-color);
}

.nav-item:hover:not(.active) {
    background: rgba(234, 124, 105, 0.2);
    transform: translateY(-2px);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Icon color changes based on active state */
.nav-item:not(.active) svg path {
    fill: var(--accent-color);
}

.nav-item.active svg path {
    fill: white;
}

/* Special handling for sidebar-logo */
.sidebar-logo .nav-item:not(.active) {
    background: rgba(235, 150, 106, 0.26);
}

.sidebar-logo .nav-item.active {
    background: var(--accent-color);
}

.logout-btn {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: rgba(234, 124, 105, 0.1);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: rgba(234, 124, 105, 0.2);
    transform: translateX(-50%) translateY(-2px);
}

.logout-btn svg path {
    fill: var(--accent-color);
}

/* Main Content */
.main-content {
    margin-left: 561px; /* Space for sidebar (128px) + order panel (433px) */
    padding: 24px;
    padding-right: 24px;
    transition: margin-left 0.3s ease;
}

/* Main content when order panel is hidden */
.main-content.order-panel-hidden {
    margin-left: 128px; /* Only space for sidebar */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.date {
    color: var(--text-light);
    font-size: 16px;
    font-weight: 400;
}

.store-name {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.search-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 250px;
}

.search-box:focus-within {
    border-color: var(--accent-color);
}

.divider {
    width: 100%;
    height: 2px;
    background: var(--border-color);
    margin: 24px 0;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.category-tab {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.category-tab:hover {
    color: var(--accent-color);
}

.category-tab.active {
    color: var(--accent-color);
}

.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Products Section */
.products-section h2 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.product-card {
    width: 192px;
    height: 260px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-bg {
    width: 192px;
    height: 226px;
    background: linear-gradient(180deg, var(--accent-color) 0%, var(--bg-secondary) 100%);
    border-radius: 16px;
    position: absolute;
    top: 34px;
    transition: all 0.3s ease;
}

.product-card:hover .product-bg {
    box-shadow: 0 10px 30px rgba(234, 124, 105, 0.3);
}

.product-shadow {
    width: 192px;
    height: 201px;
    background: rgba(136, 152, 152, 0.16);
    box-shadow: 64px 64px 64px;
    border-radius: 8px;
    filter: blur(32px);
    position: absolute;
    top: 54px;
}

.product-title {
    position: absolute;
    top: 91px;
    left: 24px;
    width: 144px;
    text-align: center;
    color: var(--text-primary);
    font-weight: 600;
    text-shadow: 7px 7px 7px rgba(0, 0, 0, 0.25);
}

.product-weight {
    position: absolute;
    top: 166px;
    left: 24px;
    width: 144px;
    text-align: center;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 500;
}

.product-price {
    position: absolute;
    top: 205px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 400;
}

/* Combo Section */
.combo-section {
    margin-top: 24px;
}

.combo-section h2 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.combo-tables {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.combo-table-container {
    flex: 1;
    min-width: 300px;
}

.combo-table-container h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.combo-table {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 80px;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.table-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 80px;
    gap: 12px;
    padding: 12px 8px;
    margin-bottom: 8px;
    background: var(--bg-primary);
    border-radius: 8px;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.table-row:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.table-row div {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 400;
}

.table-row div:nth-child(2),
.table-row div:nth-child(3) {
    text-align: center;
}

.add-btn {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    background: #d56b5a;
    transform: scale(1.1);
}

.add-btn:active {
    transform: scale(0.95);
}

/* Table scrollbar styling */
.table-body::-webkit-scrollbar {
    width: 6px;
}

.table-body::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.table-body::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.table-body::-webkit-scrollbar-thumb:hover {
    background: #d56b5a;
}

/* Order Panel */
.order-panel {
    position: fixed;
    left: 128px; /* Position after sidebar */
    top: 0;
    width: 433px;
    height: 100vh;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1); /* Changed shadow direction */
    overflow-y: auto;
}

.order-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.order-header span:first-child {
    flex: 1;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.order-header span:nth-child(2) {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    width: 48px;
    text-align: center;
    margin: 0 24px;
}

.order-header span:last-child {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.order-number {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.order-items {
    max-height: 454px;
    overflow-y: auto;
    padding-right: 10px;
}

.order-item {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.order-item-price {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.order-item-qty {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    color: var(--text-primary);
    width: 48px;
    text-align: center;
    font-weight: 500;
    margin: 0 24px;
    transition: all 0.2s ease;
}

.order-item-total {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    min-width: 60px;
    text-align: right;
    transition: all 0.3s ease;
}

.order-item-delete {
    background: transparent;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 8px;
    margin-left: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 32px;
    height: 32px;
}

.order-item-delete:hover {
    background: rgba(234, 124, 105, 0.1);
    transform: scale(1.1);
}

.order-item-delete svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.order-note-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.order-note {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    color: var(--text-muted);
    flex: 1;
    resize: none;
    outline: none;
}

.order-note:focus {
    border-color: var(--accent-color);
}

.delete-btn {
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 14px;
    background: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}

.delete-btn:hover {
    background: rgba(234, 124, 105, 0.1);
    color: var(--accent-color);
}

.order-summary {
    margin-top: 42px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.summary-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
}

.summary-value {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.payment-btn {
    width: 361px;
    padding: 14px;
    background: var(--accent-color);
    box-shadow: 0px 8px 24px rgba(234, 124, 105, 0.30);
    border-radius: 8px;
    border: none;
    color: #FAFAFA;
    font-size: 14px;
    font-weight: 600;
    margin-top: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-btn:hover {
    background: #d56b5a;
    transform: translateY(-2px);
    box-shadow: 0px 12px 32px rgba(234, 124, 105, 0.40);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .order-panel {
        width: 380px;
    }
    
    .main-content {
        margin-left: 508px; /* Updated for new layout: sidebar (128px) + order panel (380px) */
    }
    
    .payment-btn {
        width: 320px;
    }
}

@media (max-width: 1200px) {
    .main-content {
        margin-left: 128px; /* Just sidebar margin */
        padding: 24px;
    }
    
    .order-panel {
        position: relative;
        left: 0; /* Reset left positioning */
        width: 100%;
        height: auto;
        margin-top: 24px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        gap: 20px;
    }
    
    .combo-tables {
        flex-direction: column;
        gap: 24px;
    }
    
    .combo-table-container {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .main-content {
        margin-left: 94px; /* Just sidebar margin for mobile */
        padding: 24px;
    }
    
    .order-panel {
        left: 0; /* Reset left positioning for mobile */
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box {
        width: 100%;
        min-width: auto;
    }
    
    .category-tabs {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        gap: 16px;
    }
    
    .combo-tables {
        flex-direction: column;
        gap: 16px;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1.5fr 1fr 1fr 60px;
        gap: 8px;
        font-size: 12px;
    }
    
    .add-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .product-card {
        width: 160px;
        height: 220px;
    }
    
    .product-bg {
        width: 160px;
        height: 186px;
    }
    
    .product-shadow {
        width: 160px;
        height: 161px;
    }
    
    .order-panel {
        padding: 16px;
    }
    
    .payment-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 60px;
    }
    
    .main-content {
        margin-left: 84px; /* Just sidebar margin for very small screens */
        padding: 16px;
    }
    
    .store-name {
        font-size: 24px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        gap: 12px;
    }
    
    .product-card {
        width: 140px;
        height: 200px;
    }
    
    .product-bg {
        width: 140px;
        height: 166px;
    }
}

/* Utility Classes for Bootstrap Integration */
.btn-primary-custom {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #FAFAFA;
}

.btn-primary-custom:hover {
    background-color: #d56b5a;
    border-color: #d56b5a;
}

.text-primary-custom {
    color: var(--text-primary) !important;
}

.text-secondary-custom {
    color: var(--text-secondary) !important;
}

.bg-primary-custom {
    background-color: var(--bg-primary) !important;
}

.bg-secondary-custom {
    background-color: var(--bg-secondary) !important;
}

.border-custom {
    border-color: var(--border-color) !important;
}

/* Scrollbar Styling */
.order-items::-webkit-scrollbar {
    width: 6px;
}

.order-items::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.order-items::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.order-items::-webkit-scrollbar-thumb:hover {
    background: #d56b5a;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid var(--bg-tertiary);
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty Cart Message Styles */
.empty-cart-message {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    animation: fadeIn 0.5s ease-in;
}

.empty-cart-message svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-cart-message p:first-of-type {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 16px;
    margin: 0 0 8px 0;
}

.empty-cart-message p:last-of-type {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Analytics Section Styles */
.analytics-section {
    padding: 24px;
    background: var(--bg-primary);
    border-radius: 16px;
    margin-bottom: 24px;
}

/* Center align store name only when analytics is active */
.analytics-active .store-name {
    text-align: center !important;
}

/* Additional specificity for analytics heading centering */
body.analytics-active .header .store-name {
    text-align: center !important;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.analytics-header h2 {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 600;
    margin: 0;
}

.date-filter .form-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
}

.date-filter .form-select:focus {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(234, 124, 105, 0.25);
    color: var(--text-primary);
}

.date-filter .form-select option {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.analytics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.invoice-table-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.invoice-table-container h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.invoice-table {
    background: transparent;
    color: var(--text-primary);
    margin: 0;
}

.invoice-table thead th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    border-top: 0;
}

.invoice-table tbody td {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    font-size: 14px;
    vertical-align: middle;
}

.invoice-table tbody tr:hover {
    background: rgba(234, 124, 105, 0.1);
}

.invoice-status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-voided {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.status-modified {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.invoice-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    background: var(--accent-color);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    background: #d66953;
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.action-btn.secondary:hover {
    background: #1a1826;
}

.action-btn.danger {
    background: #ef4444;
}

.action-btn.danger:hover {
    background: #dc2626;
}

.invoice-items {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Request History Responsive */
@media (max-width: 768px) {
    .analytics-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .analytics-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .invoice-table-container {
        padding: 16px;
        overflow-x: auto;
    }
    
    .invoice-table {
        min-width: 600px;
    }
    
    .invoice-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Settings Section Styles */
.settings-section {
    padding: 24px;
    background: var(--bg-primary);
    border-radius: 16px;
    margin-bottom: 24px;
}

.settings-header {
    margin-bottom: 32px;
}

.settings-header h2 {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 600;
    margin: 0;
}

.settings-content {
    display: grid;
    gap: 24px;
}

/* Profile Card */
.profile-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 200px;
}

.profile-info h3 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0 0 8px 0;
}

.profile-status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.profile-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.profile-actions {
    flex-shrink: 0;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-group label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.detail-group span {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 400;
}

/* Change Request Card */
.change-request-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.change-request-card .card-header {
    margin-bottom: 24px;
}

.change-request-card .card-header h4 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.change-request-card .card-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(234, 124, 105, 0.1);
}

.form-control:readonly {
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.form-text {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
}

/* Pending Requests */
.pending-requests-card,
.request-history-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.pending-requests-card .card-header,
.request-history-card .card-header {
    margin-bottom: 20px;
}

.pending-requests-card .card-header h4,
.request-history-card .card-header h4 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.request-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.request-item-info {
    flex: 1;
}

.request-item-info h5 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 4px 0;
}

.request-item-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.request-status {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.request-status.pending {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.request-status.approved {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.request-status.rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Request History Table */
.history-table-container {
    overflow-x: auto;
}

.request-history-table {
    background: transparent;
    color: var(--text-primary);
    margin: 0;
    width: 100%;
}

.request-history-table thead th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    border-top: 0;
}

.request-history-table tbody td {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    font-size: 14px;
    vertical-align: middle;
}

.request-history-table tbody tr:hover {
    background: rgba(234, 124, 105, 0.1);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
}

/* Settings Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .profile-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .request-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .history-table-container {
        overflow-x: auto;
    }
    
    .request-history-table {
        min-width: 600px;
    }
}

/* Responsive Analytics */
@media (max-width: 768px) {
    .analytics-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .analytics-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .invoice-table-container {
        padding: 16px;
        overflow-x: auto;
    }
    
    .invoice-table {
        min-width: 600px;
    }
    
    .invoice-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}
