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

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.container {
    max-width: none;
    width: 100%;
    margin: 0;
    background: white;
    box-shadow: none;
    padding-bottom: 5px;
}

header {
    background: white;
    color: #333;
    padding: 8px 12px;
    border-bottom: 2px solid #ddd;
}

header h1 {
    font-size: 1.3em;
    margin-bottom: 6px;
    color: #333;
    text-align: center;
}

.header-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

#searchBox {
    padding: 8px 12px;
    border: 1px solid #999;
    font-size: 14px;
    width: 300px;
    max-width: 100%;
}

.btn {
    padding: 8px 16px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    opacity: 0.9;
}

.btn-admin {
    background: #2196F3;
    color: white;
}

.btn-save {
    background: #4CAF50;
    color: white;
}

.btn-download {
    background: #FF9800;
    color: white;
}

.btn-print {
    background: #607D8B;
    color: white;
}

.btn-print {
    background: #607D8B;
    color: white;
}

.btn-print {
    background: #607D8B;
    color: white;
}

.directory-grid {
    padding: 5px;
    background: white;
    width: 100%;
    column-count: 5;
    column-gap: 5px;
}

.section {
    border: 2px solid #000;
    margin-bottom: 5px;
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    background: inherit;
}

.section h2 {
    font-size: 0.95em;
    margin: 0;
    padding: 4px 3px;
    color: #000;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #000;
    line-height: 1.1;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    font-size: 0.9em;
}

thead {
    background: rgba(0, 0, 0, 0.15);
}

th {
    padding: 4px 5px;
    text-align: center;
    font-weight: bold;
    color: #000;
    border: 1px solid #000;
    font-size: 1em;
}

td {
    padding: 3px 5px;
    border: 1px solid #000;
    text-align: center;
    line-height: 1.2;
}

tbody tr:hover {
    background: rgba(0, 0, 0, 0.05);
}

tbody tr.highlight {
    background: #ffeb3b;
    font-weight: bold;
}

input[type="text"] {
    width: 100%;
    padding: 2px 4px;
    border: 1px solid #999;
    font-size: 12px;
}

input[type="text"]:focus {
    outline: 1px solid #2196F3;
    border-color: #2196F3;
}

.section-controls {
    padding: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid #999;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    cursor: pointer;
}

.btn-add {
    background: #4CAF50;
    color: white;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-small:hover {
    opacity: 0.8;
}

.admin-info {
    background: #fff8e1;
    padding: 15px;
    margin: 10px;
    border: 1px solid #ffc107;
}

.admin-info p {
    margin: 5px 0;
    color: #000;
    font-size: 13px;
}

.error {
    color: #f44336;
    text-align: center;
    padding: 40px;
    font-size: 16px;
}

@media (max-width: 1400px) {
    .directory-grid {
        column-count: 4;
    }
}

@media (max-width: 1100px) {
    .directory-grid {
        column-count: 3;
    }
}

@media (max-width: 800px) {
    .directory-grid {
        column-count: 2;
    }
}

@media (max-width: 500px) {
    .directory-grid {
        column-count: 1;
    }

    header h1 {
        font-size: 1.2em;
    }

    #searchBox {
        width: 100%;
    }

    .header-buttons {
        flex-direction: column;
    }

    table {
        font-size: 0.7em;
    }

    th, td {
        padding: 2px;
