/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Apply Nunito to all elements */
*, *::before, *::after {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Top Bar */
.topbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

.topbar-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Menu Toggle Button (Hamburger) */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 260px;
    height: calc(100vh - 60px);
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 999;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e1e8ed;
    background: #f8f9fa;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #667eea;
    font-weight: 600;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 0.875rem 1.5rem;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: #f1f5f9;
    color: #667eea;
    border-left-color: #667eea;
}

.sidebar-nav a.active {
    background: #eff6ff;
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

/* Submenu Styles */
.menu-item-with-submenu {
    position: relative;
}

.menu-item-with-submenu > a {
    position: relative;
}

.menu-item-with-submenu > a::after {
    content: '▼';
    float: right;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.menu-item-with-submenu > a.active::after {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.25rem;
    display: none;
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    margin-left: 0.5rem;
}

.menu-item-with-submenu > a.active + .submenu,
.menu-item-with-submenu:hover .submenu {
    display: block;
}

.submenu li {
    margin: 0;
}

.submenu a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #666;
    display: block;
}

.submenu a:hover {
    background: #e9ecef;
    color: #667eea;
}

.submenu a.active {
    background: #667eea;
    color: white;
    font-weight: 600;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.sidebar-overlay.active {
    display: block;
}

/* Main Wrapper */
.main-wrapper {
    margin-left: 260px;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    transition: margin-left 0.3s ease;
}

/* Date and Time Bar */
.datetime-bar {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 3px solid #667eea;
}

.datetime-container {
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.datetime-display {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.date-display,
.time-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-label,
.time-label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.date-value,
.time-value {
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.time-value {
    color: #4ade80;
    font-size: 0.95rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.business-hours-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

.business-hours {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
}

.hours-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hours-label {
    font-size: 0.85rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hours-value {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #fbbf24;
}

/* Capture Work Button */
.btn-capture-work {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: 2px solid #2563eb;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    margin-top: 0.75rem;
}

.btn-capture-work:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-capture-work:active {
    transform: translateY(0);
}

.btn-capture-work svg {
    width: 18px;
    height: 18px;
}

.camera-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

#capturedImagePreview img,
#capturedVideoPreview video {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

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

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.login-box h2 {
    text-align: center;
    color: #666;
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 2rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #999;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-col {
    display: flex;
    flex-direction: column;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
}

.btn-add-expense {
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    min-width: 180px;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    min-width: 200px;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* Dashboard */
.dashboard h2 {
    margin-bottom: 2rem;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    display: block;
}

.stat-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-icon {
    display: none;
}

.stat-info {
    width: 100%;
}

.stat-info h3 {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0;
}

.stat-header-with-icon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.stat-header-with-icon h3 {
    margin-bottom: 0;
    flex: 1;
}

.upi-icon {
    width: 28px;
    height: 28px;
    color: #6366f1;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.stat-card-digital {
    border-left: 3px solid #6366f1;
}

.stat-card-digital .stat-header-with-icon h3 {
    color: #6366f1;
}

.stat-card-success {
    border-left: 3px solid #10b981;
}

.stat-card-success h3 {
    color: #10b981;
}

.stat-card-danger {
    border-left: 3px solid #dc3545;
}

.stat-card-danger h3 {
    color: #dc3545;
}

/* Tables */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 0;
    min-width: 600px;
}

.data-table thead {
    background: #667eea;
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 1rem;
    border-top: 1px solid #eee;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* Action Buttons in Tables */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    margin: 0;
    white-space: nowrap;
    min-width: 70px;
}

.text-center {
    text-align: center;
}

/* Category Cards */
.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.category-card {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.category-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.category-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.category-card.selected:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
}

.category-card.category-card-add {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 2px dashed #94a3b8;
    border-color: #94a3b8;
}

.category-card.category-card-add:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-color: #64748b;
    border-style: solid;
}

.category-card.selected .category-name,
.category-card .category-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: inherit;
}

.category-card.selected .category-name {
    color: white;
}

/* Vehicle Type Cards */
.vehicle-type-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.vehicle-card {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-height: 100px;
    justify-content: center;
}

.vehicle-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.vehicle-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.vehicle-card.selected:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
}

.vehicle-icon {
    font-size: 2rem;
    line-height: 1;
}

.vehicle-name {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: capitalize;
}

.vehicle-card.selected .vehicle-name {
    color: white;
}

@media (max-width: 768px) {
    .category-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .category-card {
        padding: 0.75rem 0.75rem;
        min-height: 55px;
    }
    
    .category-card .category-name {
        font-size: 0.85rem;
    }
    
    .vehicle-type-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .vehicle-card {
        padding: 0.75rem 0.5rem;
        min-height: 85px;
    }
    
    .vehicle-icon {
        font-size: 1.5rem;
    }
    
    .vehicle-name {
        font-size: 0.8rem;
    }
}

/* Employee Cards */
.employee-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.employee-card {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-height: 100px;
    justify-content: center;
}

.employee-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.employee-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.employee-card.selected:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
}

.employee-icon {
    font-size: 2rem;
    line-height: 1;
}

.employee-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.employee-role {
    font-size: 0.75rem;
    opacity: 0.8;
    font-style: italic;
}

.employee-card.selected .employee-name,
.employee-card.selected .employee-role {
    color: white;
}

/* Package Cards */
.package-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.package-card {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.package-card:hover {
    border-color: #10b981;
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.package-card.selected {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #059669;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.package-card.selected:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-2px);
}

.package-name {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.package-price {
    font-size: 1.1rem;
    font-weight: 700;
}

.package-card.selected .package-name,
.package-card.selected .package-price {
    color: white;
}

.package-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #cbd5e0;
}

@media (max-width: 768px) {
    .employee-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .employee-card {
        padding: 0.75rem 0.5rem;
        min-height: 90px;
    }
    
    .employee-icon {
        font-size: 1.5rem;
    }
    
    .employee-name {
        font-size: 0.85rem;
    }
    
    .employee-role {
        font-size: 0.7rem;
    }
    
    .package-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .package-card {
        padding: 0.875rem;
    }
    
    .package-name {
        font-size: 0.9rem;
    }
    
    .package-price {
        font-size: 1rem;
    }
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #333;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-error {
    background: #dc3545;
    color: white;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border-left: 4px solid #28a745;
}

/* Page Content */
.page-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.page-content h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 500px;
}

.search-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Filter Section */
.filter-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 2rem auto;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.btn-close:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Radio Labels for POS */
.radio-label {
    display: block;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.radio-label input[type="radio"] {
    margin-right: 1rem;
}

.radio-content {
    display: inline-block;
}

.radio-content strong {
    display: block;
    margin-bottom: 0.25rem;
}

.radio-content span {
    color: #667eea;
    font-weight: bold;
    margin-left: 1rem;
}

.radio-content small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Dashboard Sections */
.dashboard-section {
    margin-top: 2rem;
}

.dashboard-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.quick-actions {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

.quick-actions h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Calculator-style grid layout */
.calculator-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 0.75rem;
    align-items: stretch;
}

/* Adjust grid for 6 buttons (New Transaction + 5 others) */
.calculator-grid > *:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.calculator-grid > *:nth-child(n+2) {
    grid-column: auto;
    grid-row: auto;
}

/* Calculator-style button base */
.btn-calc {
    min-height: 65px;
    border-radius: 8px;
    border: 2px solid #cbd5e0;
    background: white;
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: Arial, sans-serif;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-calc:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.btn-calc:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

/* Secondary calculator buttons */
.btn-secondary-calc {
    background: white;
    color: #475569;
    border-color: #cbd5e0;
}

.btn-secondary-calc:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #334155;
}

/* Daily Checklist button - Orange and double width */
.btn-checklist-calc {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    color: white;
    border: 2px solid #f97316;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.35);
    font-weight: 700;
    font-family: Arial, sans-serif;
    grid-column: span 2;
}

.btn-checklist-calc:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-color: #ea580c;
    box-shadow: 0 6px 16px rgba(251, 146, 60, 0.45);
    transform: translateY(-3px);
}

.btn-checklist-calc:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(251, 146, 60, 0.35);
}

/* Daily Sales Entry button - Blue */
.btn-sales-entry-calc {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: 2px solid #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    font-weight: 700;
    font-family: Arial, sans-serif;
}

.btn-sales-entry-calc:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.45);
    transform: translateY(-3px);
}

.btn-sales-entry-calc:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.35);
}

/* Expense Entry button - Red */
.btn-expense-entry-calc {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: 2px solid #c82333;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
    font-weight: 700;
    font-family: Arial, sans-serif;
}

.btn-expense-entry-calc:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    border-color: #bd2130;
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.45);
    transform: translateY(-3px);
}

.btn-expense-entry-calc:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.35);
}

/* Primary calculator button - New Transaction (Bigger) */
.btn-primary-calc {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 2px solid #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    font-family: Arial, sans-serif;
}

.btn-primary-calc:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #047857;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
    transform: translateY(-3px);
}

.btn-primary-calc:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.35);
}

/* Large button - spans 2 columns and 2 rows (left side) */
.btn-large-calc {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    min-height: 140px;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 3px solid #059669;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-large-calc:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #047857;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-3px);
}

.btn-large-calc:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .calculator-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .btn-large-calc {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
        min-height: 80px;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    /* Mobile calculator-style layout: New Transaction full width, others in 2 columns */
    .calculator-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.6rem;
    }
    
    .btn-large-calc {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
        min-height: 70px;
        font-size: 1.15rem;
        font-weight: 700;
        border: 3px solid #059669;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    }
    
    .btn-large-calc:hover {
        box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
    }
    
    .btn-checklist-calc {
        grid-column: 1 / 3;
    }
    
    .btn-calc {
        min-height: 65px;
        font-size: 0.9rem;
        font-weight: 600;
        border: 2px solid #cbd5e0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .btn-secondary-calc {
        border-color: #cbd5e0;
    }
    
    .btn-calc:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    }
    
    .btn-calc:active {
        transform: translateY(0);
        box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    }
}

/* Detail Pages */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.detail-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-grid label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.detail-grid p {
    margin-top: 0.25rem;
    color: #333;
}

.detail-section {
    margin-top: 2rem;
}

.detail-section h3 {
    margin-bottom: 1rem;
}

/* Financial Summary */
.financial-summary {
    margin-bottom: 2rem;
}

.financial-summary h3 {
    margin-bottom: 1.5rem;
}

.closing-form-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.financial-summary-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1.5rem 0;
}

.financial-summary-box h4 {
    margin-bottom: 1rem;
}

/* Daily Sales Entry */
.sales-entry-section {
    margin-top: 2rem;
}

.sales-summary-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e1e8ed;
}

.sales-summary-box h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-item label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
}

.summary-value.highlight {
    color: #667eea;
    font-size: 1.75rem;
}

.sales-entry-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

.sales-entry-form h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.form-help-text {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.8rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.expense-breakdown {
    margin-top: 1.5rem;
}

/* Checklist */
.checklist-section {
    margin-bottom: 2rem;
}

.checklist-section h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checklist-item {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #fb923c;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(251, 146, 60, 0.15);
    width: 100%;
}

.checklist-item:hover {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border-color: #f97316;
    box-shadow: 0 4px 8px rgba(251, 146, 60, 0.2);
}

.checklist-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: transparent;
}

.checklist-content {
    flex: 1;
    width: 100%;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.checklist-meta {
    margin-top: 0.5rem;
    color: #666;
}

.checklist-notes {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 3px;
}

.checklist-actions {
    margin-left: 1rem;
}

.checklist-progress {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Utility Classes */
.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.text-muted {
    color: #6c757d;
    font-size: 0.85rem;
}

.history-section {
    margin-top: 2rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 1200px) {
    /* Tablet and below - sidebar hidden by default, toggleable */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Always show hamburger on tablet */
    .menu-toggle {
        display: flex;
    }
}

/* Desktop - sidebar visible by default, but still toggleable */
@media (min-width: 1201px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .sidebar.hidden {
        transform: translateX(-100%);
    }
    
    .main-wrapper {
        margin-left: 260px;
        transition: margin-left 0.3s ease;
    }
    
    .main-wrapper.sidebar-hidden {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    /* Set base font size to 16px for mobile (excluding headings) */
    body {
        font-size: 16px;
    }
    
    /* Ensure headings maintain their relative sizes */
    h1, h2, h3, h4, h5, h6,
    .page-content h2,
    .dashboard-section h3,
    .quick-actions h3 {
        font-size: inherit; /* Will use their specific sizes */
    }
    
    .topbar {
        padding: 1rem;
    }
    
    .topbar-brand h1 {
        font-size: 1.2rem;
    }
    
    .topbar-user span {
        display: none;
    }
    
    .datetime-bar {
        padding: 1rem;
    }
    
    .datetime-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .datetime-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
    }
    
    .business-hours-wrapper {
        width: 100%;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .business-hours {
        width: 100%;
        justify-content: space-around;
        padding: 0.5rem 1rem;
        gap: 1rem;
    }
    
    .hours-item {
        gap: 0.3rem;
    }
    
    .hours-label {
        font-size: 0.7rem;
    }
    
    .hours-value {
        font-size: 0.9rem;
    }
    
    .btn-capture-work {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: center;
    }
    
    .btn-capture-work svg {
        width: 16px;
        height: 16px;
    }
    
    .datetime-display {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        flex-wrap: nowrap;
        width: 100%;
    }
    
    .date-display,
    .time-display {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        white-space: nowrap;
    }
    
    .date-label {
        font-size: 0.75rem;
        opacity: 0.8;
    }
    
    .date-value,
    .time-value {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .time-value {
        font-size: 1rem;
        color: #4ade80;
    }
    
    /* Table wrapper for horizontal scrolling */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 0 1rem;
    }
    
    /* Table styling for mobile */
    .data-table {
        font-size: 0.875rem;
        min-width: 600px;
    }
    
    .data-table th {
        padding: 0.75rem 0.6rem;
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
    }
    
    .data-table td {
        padding: 0.75rem 0.6rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    .data-table .btn-sm {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
        min-width: 65px;
    }
    
    .action-buttons {
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    .action-buttons .btn {
        flex: 0 0 auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .btn-add-expense {
        width: 100%;
        min-width: auto;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-info h3 {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
        margin-bottom: 0.2rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form {
        max-width: 100%;
    }
    
    .container {
        padding: 1rem;
    }
}



/* Date column styling - narrower and smaller */
.col-date {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.col-date small {
    font-size: 0.75rem;
    display: block;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .data-table th.col-date,
    .data-table td.col-date {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        white-space: normal !important;
    }
    
    .col-date small {
        font-size: 0.7rem;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.2;
        display: block;
    }
}

/* Quick Actions Sections */
.quick-actions-section {
    margin-bottom: 2rem;
}

.quick-actions-section:last-child {
    margin-bottom: 0;
}

.quick-actions-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e1e8ed;
}

@media (max-width: 768px) {
    .quick-actions-section {
        margin-bottom: 1.5rem;
    }
    
    .quick-actions-heading {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

@media (max-width: 768px) {
    .badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}
