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

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

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    background: white;
    box-shadow: 0 1px 5px rgba(0,0,0,0.15);
    padding: 12px;
}

header {
    background: white;
    color: #333;
    padding: 12px;
    border-bottom: 1px solid #ccc;
    margin: -12px -12px 12px -12px;
}

header h1 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
    font-weight: bold;
}

.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: 13px;
    width: 350px;
    max-width: 100%;
    height: 36px;
    font-size: 13px;
}

.btn {
    padding: 8px 16px;
    background: #607D8B;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 13px;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn:hover {
    opacity: 0.9;
}

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

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

.section {
    border: 2px solid #000;
    background: white;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    margin-bottom: 6px;
}

.section h2 {
    font-size: 0.9em;
    margin: 0;
    padding: 6px 4px;
    color: #000;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #000;
    line-height: 1.3;
    background-color: inherit;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.75em;
    margin: 0;
    padding: 0;
}

colgroup col:nth-child(1) {
    width: 55%;
}

colgroup col:nth-child(2) {
    width: 25%;
}

colgroup col:nth-child(3) {
    width: 20%;
}

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

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

td {
    padding: 2px 3px;
    border: 1px solid #000;
    line-height: 1.1;
    font-size: 0.8em;
}

td:nth-child(1) {
    text-align: left;
}

td:nth-child(2) {
    text-align: left;
}

td:nth-child(3) {
    text-align: center;
}

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

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;
}

.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;
