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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    margin-bottom: 20px;
    color: #2c3e50;
}

h2 {
    margin: 20px 0 10px;
    color: #34495e;
    font-size: 1.4em;
}

h3 {
    margin: 15px 0 10px;
    color: #555;
    font-size: 1.2em;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-primary {
    background: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

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

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Estimate Form */
.estimate-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Estimate Result */
.estimate-result {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.estimate-result h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.value-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.value-item.main {
    background: #e3f2fd;
}

.value-item .label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.value-item .amount {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.confidence {
    margin: 15px 0;
    font-weight: 600;
    color: #27ae60;
}

.conditions {
    margin: 10px 0;
    font-size: 14px;
    color: #7f8c8d;
}

.disclaimer {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    font-size: 14px;
    color: #856404;
}

/* Admin */
.admin-nav {
    background: #2c3e50;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
}

.admin-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav .logo {
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.admin-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.admin-nav a {
    color: white;
    text-decoration: none;
}

.admin-nav a:hover {
    text-decoration: underline;
}

/* Admin sections */
.admin-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #34495e;
    color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Inline forms */
.inline-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.inline-form input,
.inline-form select {
    flex: 1;
    min-width: 150px;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: #3498db;
    margin: 10px 0;
}

.stat-card a {
    display: inline-block;
    margin-top: 10px;
    color: #3498db;
    text-decoration: none;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

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

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

.hint {
    text-align: center;
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 15px;
}

/* Valuation form */
.valuation-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
}

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

.condition-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.condition-row select,
.condition-row input {
    flex: 1;
}

.condition-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.condition-list li {
    padding: 3px 0;
    font-size: 12px;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Import sections */
.import-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

details {
    margin-top: 15px;
}

summary {
    cursor: pointer;
    color: #3498db;
    font-weight: 600;
}

pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 10px;
    font-size: 12px;
}

code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-nav .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
    
    .values {
        grid-template-columns: 1fr;
    }
}
