/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    padding: 20px;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

/* Navigation */
.nav {
    background: #007cba;
    padding: 15px;
    margin: -30px -30px 30px -30px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav a:hover {
    background: rgba(255,255,255,0.2);
}

.logout {
    background: #dc3545;
    padding: 8px 15px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.logout:hover {
    background: #c82333;
}

/* Typography */
h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

h1 {
    font-size: 2.2em;
    border-bottom: 3px solid #007cba;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h2 {
    font-size: 1.8em;
    color: #007cba;
}

h3 {
    font-size: 1.4em;
    color: #495057;
}

/* Forms */
.section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

input, textarea, select {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
}

textarea {
    height: 80px;
    resize: vertical;
}

/* Buttons */
button, .btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    margin: 5px;
}

button:hover, .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary, button[type="submit"] {
    background: #007cba;
    color: white;
}

.btn-primary:hover, button[type="submit"]:hover {
    background: #0056b3;
}

.btn-secondary, button[type="button"] {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover, button[type="button"]:hover {
    background: #545b62;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

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

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

th {
    background: #007cba;
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

tr:hover {
    background: #f8f9fa;
}

.actions {
    white-space: nowrap;
    text-align: center;
}

.actions form {
    display: inline;
}

.actions button {
    margin: 2px;
    padding: 6px 12px;
    font-size: 12px;
}

/* Menu Grid */
.menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.menu-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.menu-item:hover {
    border-color: #007cba;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,124,186,0.15);
    color: #007cba;
}

.menu-item h3 {
    color: #007cba;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.menu-item p {
    color: #6c757d;
    font-size: 14px;
}

/* Login Form */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #007cba;
}

.login-container input {
    max-width: none;
}

.login-container button {
    width: 100%;
    margin-top: 10px;
}

/* Error Messages */
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 15px 0;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    margin: 15px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    .nav {
        margin: -20px -20px 20px -20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .menu {
        grid-template-columns: 1fr;
    }
    
    input, textarea, select {
        max-width: none;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
    
    .actions button {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.p-20 { padding: 20px; }