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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: #f5f5f5;
}

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

/* Navigation */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.navbar .nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.navbar .nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.navbar .nav-links a:hover {
    color: #3498db;
}

/* Dark mode */
body.dark-mode {
    background: #1a1a2e;
}

body.dark-mode .page-content {
    background: #16213e;
    color: #eaeaea;
}

body.dark-mode .page-header h1 {
    color: #eaeaea;
}

body.dark-mode table {
    background: #16213e;
}

body.dark-mode td,
body.dark-mode table {
    color: #eaeaea;
}

body.dark-mode th {
    background: #0f3460;
    color: #eaeaea;
}

body.dark-mode tr:hover {
    background: #0f3460;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea,
body.dark-mode .form-group select {
    background: #16213e;
    color: #eaeaea;
    border-color: #0f3460;
}

body.dark-mode .btn {
    background: #0f3460;
}

body.dark-mode .btn:hover {
    background: #1a4a7a;
}

body.dark-mode .btn-danger {
    background: #e94560;
}

body.dark-mode .btn-danger:hover {
    background: #d63447;
}

body.dark-mode .flash.success {
    background: #1e3a2f;
    color: #8fbc8f;
    border-color: #0f3460;
}

body.dark-mode .flash.error {
    background: #3a1e1e;
    color: #e58e8e;
    border-color: #0f3460;
}

body.dark-mode .footer {
    background: #1a1a2e;
}

/* Dark mode toggle button */
.dark-mode-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
    margin-left: 1rem;
    display: flex;
    align-items: center;
}

.dark-mode-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.navbar .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar .btn {
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.navbar .btn:hover {
    background: #2980b9;
}

/* Language selector */
.language-selector {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.language-selector button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.language-selector button:hover {
    background: rgba(255,255,255,0.2);
}

.language-selector button.active {
    background: #3498db;
    border-color: #3498db;
}

/* Main content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.page-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Flash messages */
.flash {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

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

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

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 300px;
    font-family: monospace;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.3s;
}

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

.btn-danger {
    background: #e74c3c;
}

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f8f9fa;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

/* Header sections */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: auto;
}

/* Login page specific styles */
.login-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-page .main-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-page .navbar .nav-links {
    gap: 2rem;
}

/* Admin page specific styles */
.page-header p {
    color: #666;
}

.admin-section {
    margin-bottom: 3rem;
}

.admin-section h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

body.dark-mode .admin-section h2 {
    color: #eaeaea;
}

small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.875rem;
}

body.dark-mode small {
    color: #a0a0a0;
}

.back-link {
    text-align: center;
    margin-top: 1rem;
}

.back-link a {
    color: #3498db;
    text-decoration: none;
}

body.dark-mode .back-link a {
    color: #3498db;
}

.lang-btn.active {
    background: #3498db;
    border-color: #3498db;
}

/* Admin page form classes */
.page-form,
.user-form,
.password-form {
    margin-top: 1rem;
}

.delete-form {
    display: inline;
    margin-right: 0.5rem;
}

.cancel-btn {
    background: #95a5a6;
}

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

.delete-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.status-select {
    padding: 0.25rem;
    font-size: 0.9rem;
}

.status-form {
    display: inline;
    margin-right: 0.5rem;
}

.deleted-row {
    background: #f8d7da;
}

body.dark-mode .deleted-row {
    background: #3a1e1e;
}

.status-badge {
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}
