/* Main Stylesheet */
* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    min-width: 250px;
    max-width: 250px;
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
}

.sidebar.active {
    margin-left: -250px;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
}

.sidebar-header h4 {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
}

.sidebar ul.components {
    padding: 20px 0;
}

.sidebar ul li a {
    padding: 12px 20px;
    display: block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar ul li a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: #fff;
}

.sidebar ul li a i {
    margin-right: 10px;
}

.sidebar ul ul a {
    padding-left: 50px !important;
    font-size: 0.9rem;
}

/* Content */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0 !important;
}

.card-header h5 {
    margin: 0;
    color: #2c3e50;
}

/* Stat Cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.green { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.stat-card.orange { background: linear-gradient(135deg, #f12711 0%, #f5af19 100%); }
.stat-card.blue { background: linear-gradient(135deg, #2980b9 0%, #6dd5fa 100%); }
.stat-card.purple { background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%); }

.stat-card .stat-icon {
    font-size: 3rem;
    opacity: 0.3;
    float: right;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

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

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo i {
    font-size: 3rem;
    color: #667eea;
}

/* Invoice/Receipt Print */
.invoice-box {
    max-width: 800px;
    margin: auto;
    padding: 40px;
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, .15);
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #667eea;
}

.invoice-title {
    color: #667eea;
    font-size: 36px;
    font-weight: bold;
    margin: 0;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.invoice-table th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
}

.invoice-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.invoice-table tr:nth-child(even) {
    background: #f9f9f9;
}

.totals-table {
    width: 300px;
    margin-left: auto;
    margin-top: 20px;
}

.totals-table td {
    padding: 8px;
}

.totals-table .total-row {
    font-size: 18px;
    font-weight: bold;
    background: #667eea;
    color: white;
}

@media print {
    .no-print { display: none !important; }
    .sidebar, .navbar { display: none !important; }
    #content { width: 100% !important; }
    .invoice-box { box-shadow: none; border: none; }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    .sidebar.active {
        margin-left: 0;
    }
}

/* Status badges */
.badge {
    padding: 6px 10px;
    font-weight: 500;
}

/* Form styling */
.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102,126,234,0.25);
}

/* Watermark for paid invoices */
.watermark {
    position: absolute;
    opacity: 0.1;
    font-size: 120px;
    transform: rotate(-30deg);
    color: green;
    font-weight: bold;
    top: 40%;
    left: 30%;
    pointer-events: none;
}
