/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(255,255,255,0.1);
    padding-left: 25px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 20px;
}

.top-bar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Forms */
.prf-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.left-header h1 {
    font-size: 20px;
    color: #333;
}

.left-header h2 {
    font-size: 16px;
    color: #666;
}

.left-header h3 {
    font-size: 18px;
    text-decoration: underline;
    margin-top: 5px;
}

.right-header .info-row {
    margin-bottom: 10px;
}

.right-header label {
    font-weight: bold;
    display: inline-block;
    width: 80px;
}

.right-header input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #667eea;
}

.form-row {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
}

.form-row label {
    width: 100px;
    font-weight: bold;
}

.form-row input,
.form-row textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Tables */
.items-table,
.approval-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.items-table th,
.items-table td,
.approval-table th,
.approval-table td,
.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.items-table th,
.approval-table th,
.data-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.items-table input,
.approval-table input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.amount {
    background: #f9f9f9;
}

/* Buttons */
.add-row,
.add-approval {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.remove-row,
.remove-approval {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.form-actions button,
.form-actions a {
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-save {
    background: #007bff;
    color: white;
}

.btn-print {
    background: #17a2b8;
    color: white;
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    margin: 0 2px;
    display: inline-block;
}

.btn-danger {
    background: #dc3545;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-submitted {
    background: #ffc107;
    color: #856404;
}

.status-approved {
    background: #28a745;
    color: white;
}

.status-rejected {
    background: #dc3545;
    color: white;
}

/* Filters */
.filters-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filters-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-filter {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* Alert */
.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Signature Grid */
.signature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.signature-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.signature-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.total-section {
    text-align: right;
    font-size: 18px;
    font-weight: bold;
}

.total-section input {
    font-size: 18px;
    width: 200px;
    text-align: right;
    padding: 8px;
}

/* View Actions */
.view-actions {
    margin-top: 30px;
    text-align: center;
}

.btn-pdf {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 10px;
    display: inline-block;
}

.btn-back,
.btn-new {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 10px;
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    .main-content {
        margin-left: 200px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .signature-grid {
        grid-template-columns: 1fr;
    }
    .form-header {
        flex-direction: column;
    }
}