:root {
    --primary: #f15a29; /* Petpooja Orange */
    --primary-hover: #d94e21;
    --secondary: #ffffff;
    --accent: #2c3e50;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --bg-light: #f4f6f9;
    --bg-card: #ffffff;
    --border-color: #e9ecef;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --sidebar-width: 250px;
    --header-height: 60px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}

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

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
    background-color: rgba(241, 90, 41, 0.08); /* Primary with opacity */
    border-right: 3px solid var(--primary);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 900;
}

.page-wrapper {
    padding: 1.5rem;
    width: 100%;
    margin: 0 auto;
}

/* Components */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.btn-outline:hover {
    background: var(--bg-light);
    border-color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #ffbfa6; /* Lighter primary */
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(241, 90, 41, 0.25);
}

/* Grid & Tables */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th {
    background-color: #f8f9fa;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

/* Utilities */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--text-muted) !important; }
.bg-white { background-color: var(--white) !important; }
.d-flex { display: flex !important; }
.align-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.gap-2 { gap: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }

/* Dashboard specifics */
.stat-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(241, 90, 41, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 1rem;
}
.stat-info h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}
.stat-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Login Page Specifics */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #FFF5F2 0%, #FFFFFF 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    text-align: center;
}

.login-brand {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-subtitle {
     color: var(--text-muted);
     margin-bottom: 2rem;
}

/* POS Specifics (Future Proofing) */
.pos-layout {
    display: grid;
    grid-template-columns: 240px 1fr 340px; /* Sidebar, Items, Cart */
    height: 100vh;
    overflow: hidden;
}

.pos-category-list {
    background: white;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.pos-item-grid {
    padding: 1rem;
    overflow-y: auto;
    background: var(--bg-light);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    align-content: start;
}

.pos-cart-panel {
    background: white;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.pos-item-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-item-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(241, 90, 41, 0.15);
}

.pos-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    background: #f8f9fa;
}

.pos-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-item-price {
    color: var(--primary);
    font-weight: 700;
}
