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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

header h1 {
    margin: 0 0 10px 0;
    font-size: 2em;
}

nav a {
    color: #3498db;
    text-decoration: none;
    margin-right: 20px;
    font-weight: 500;
}

nav a:hover {
    color: #2980b9;
}

main {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

h3 {
    color: #34495e;
    margin: 20px 0 10px 0;
}

/* Flash Messages */
.flash {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

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

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

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.brick-table,
.locations-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

.brick-table th,
.locations-table th {
    background: #34495e;
    color: white;
    font-weight: 600;
}

.brick-table tr:hover,
.locations-table tr:hover {
    background: #f8f9fa;
}

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

.storage-list li {
    padding: 3px 0;
}

.no-location {
    color: #e74c3c;
    font-style: italic;
}

.no-data {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px !important;
}

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

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

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

.btn-success {
    background: #27ae60;
    color: white;
}

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

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

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

.btn-secondary {
    background: #95a5a6;
    color: white;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

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

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

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

.form-control {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.barcode-input {
    font-size: 18px;
    font-weight: bold;
    max-width: 500px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 13px;
}

/* Item Details */
.item-details {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.item-details dl {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px;
}

.item-details dt {
    font-weight: 600;
    color: #2c3e50;
}

.item-details dd {
    color: #34495e;
}

/* Storage Mapping */
.storage-mapping {
    max-width: 900px;
}

.current-locations {
    margin: 30px 0;
}

.add-location {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    border: 2px solid #3498db;
}

.barcode-form {
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    main {
        padding: 15px;
    }

    .brick-table th,
    .brick-table td {
        padding: 8px;
        font-size: 14px;
    }

    .item-details dl {
        grid-template-columns: 1fr;
    }

    .form-control {
        max-width: 100%;
    }
}
