/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 20px 0;
}

header h1 {
    margin-bottom: 5px;
}

header p {
    opacity: 0.9;
    font-size: 16px;
}

/* Navigation */
nav {
    background: #333;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

nav li {
    margin: 0 5px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 14px;
}

nav a:hover {
    background: #555;
    transform: translateY(-2px);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Welcome Box */
.welcome-box {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.welcome-box h2 {
    margin-bottom: 10px;
    color: #333;
}

/* Table Header */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.table-header h2 {
    color: #333;
    margin: 0;
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
}

tr:hover {
    background: #f8f9fa;
}

td.actions {
    white-space: nowrap;
}

/* Buttons */
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
    font-size: 14px;
    transition: all 0.3s;
    color: white;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    color: black;
}

.btn-secondary {
    background: #6c757d;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

/* Form */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.form-actions {
    margin-top: 20px;
    text-align: right;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

/* Record Count */
.record-count {
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        padding: 0 10px;
    }
    
    nav li {
        margin: 2px 0;
        width: 100%;
    }
    
    nav a {
        text-align: center;
    }
    
    main {
        padding: 10px;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-header h2 {
        text-align: center;
        margin-bottom: 10px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 4px;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .btn-small {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 15px 10px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .search-box input {
        max-width: 100%;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}