* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 10px;
}

/* Navigation */
nav {
    margin-bottom: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    margin-right: 20px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #444;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

/* Calculator */
.calculator-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.calculator-inputs {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calculator-result {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-summary {
    text-align: center;
    margin: 20px 0;
}

.total-cost {
    font-size: 2.5rem;
    font-weight: bold;
    color: #28a745;
}

.cost-breakdown {
    list-style: none;
    margin-top: 20px;
}

.cost-breakdown li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.cost-breakdown li:last-child {
    border-bottom: none;
}

.cost-breakdown .total {
    font-weight: bold;
    color: #667eea;
}

/* Admin Table */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #667eea;
    color: white;
}

table tr:hover {
    background-color: #f5f5f5;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
    color: #666;
    transition: all 0.3s;
}

.tab.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    margin-bottom: -2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

/* Constructor styles */
.constructor-section {
    margin-top: 40px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.constructor-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    margin-top: 20px;
}

.canvas-container {
    position: relative;
}

.canvas-tools {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.info-badge {
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.constructor-tools {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
}

.tool-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.tool-group h3 {
    margin-bottom: 10px;
    color: #444;
    font-size: 1rem;
}

.tool-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-btn {
    flex: 1 1 auto;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 0.9rem;
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.tool-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.param-item {
    margin-bottom: 10px;
}

.param-item label {
    display: block;
    margin-bottom: 3px;
    font-size: 0.9rem;
    color: #666;
}

.param-item input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.stats {
    background: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.stats div {
    margin: 5px 0;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.stats div:last-child {
    border-bottom: none;
}

.rooms-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
}

.room-item {
    background: white;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    border-left: 4px solid #3498db;
    font-size: 0.9rem;
}

.room-item strong {
    color: #2c3e50;
}

/* Responsive */
@media (max-width: 968px) {
    .constructor-container {
        grid-template-columns: 1fr;
    }

    .canvas-container {
        order: 2;
    }

    .constructor-tools {
        order: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-section {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1 1 auto;
    }
}