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

body, html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.header {
    background: #4A90E2;
    color: white;
    padding: 12px 20px;
    text-align: center;
    flex-shrink: 0;
    width: 100%;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
}

.toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
    width: 100%;
}

.toolbar .toggle-btn {
    padding: 6px 12px;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.toolbar .toggle-btn:hover {
    background: #357abd;
}

.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 0;
    min-width: 0;
    background: #2c3e50;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.sidebar.expanded {
    width: 200px;
    min-width: 200px;
    overflow-y: auto;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #34495e;
}

.sidebar li:hover,
.sidebar li.active {
    background: #34495e;
}

.sidebar-header {
    padding: 12px;
    text-align: right;
    cursor: pointer;
    font-size: 18px;
    color: #aaa;
}

.sidebar-header:hover {
    color: #fff;
}

.content {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
}

.form-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-section h2 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.form-group {
    flex: 1 1 200px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

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

.form-group input[readonly] {
    background-color: #e9ecef;
}

.total-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.total-section h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #333;
}

.total-section p {
    margin: 6px 0;
    font-size: 14px;
}

.two-column {
    display: flex;
    gap: 20px;
}

.two-column > div {
    flex: 1;
}

.two-column .right-col {
    border-left: 1px solid #e0e0e0;
    padding-left: 20px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #4A90E2;
    color: white;
}

.btn-primary:hover {
    background: #357abd;
}

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

.btn-success:hover {
    background: #218838;
}

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

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

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

.btn-danger:hover {
    background: #c82333;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
}

.drop-zone:hover {
    border-color: #4A90E2;
    background: #f0f8ff;
}

.file-list {
    margin-top: 10px;
}

.file-item {
    padding: 8px 12px;
    margin: 4px 0;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item .remove-btn {
    color: #dc3545;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 14px;
}

.history-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px 8px;
    text-align: left;
    font-size: 13px;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

tr:hover {
    background: #f5f5f5;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 10px 24px;
    background: #f8f9fa;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #333;
}

.tab-btn.active {
    background: white;
    color: #4A90E2;
    border-bottom-color: #4A90E2;
    font-weight: 600;
}