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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    color: #4f46e5;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #4f46e5;
}

.nav-link.active {
    background: #4f46e5;
    color: white;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Alert Messages */
.alert-container {
    position: fixed;
    top: 100px;
    right: 2rem;
    z-index: 1001;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background: #10b981;
}

.alert-error {
    background: #ef4444;
}

.alert-info {
    background: #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Auth Sections */
.auth-section {
    padding: 8rem 2rem 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1f2937;
    font-size: 1.8rem;
}

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

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

.form-group input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #4f46e5;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: #6b7280;
}

.auth-switch a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard */
.dashboard {
    padding: 8rem 2rem 4rem;
    min-height: 100vh;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.dashboard-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-size: 1.5rem;
}

/* Profile Card */
.profile-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.profile-avatar {
    text-align: center;
}

.avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e5e7eb;
    margin-bottom: 1rem;
}

.profile-info {
    flex: 1;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.info-item label {
    font-weight: 600;
    min-width: 100px;
}

.info-item span {
    flex: 1;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 6px;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Logs */
.logs-card {
    grid-column: 1 / -1;
}

.logs-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.logs-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.log-entry {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    display: grid;
    grid-template-columns: 120px 100px 120px 1fr 100px;
    gap: 1rem;
    font-size: 0.875rem;
    align-items: center;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry:nth-child(even) {
    background: #f9fafb;
}

.log-timestamp {
    color: #6b7280;
    font-family: monospace;
}

.log-user {
    font-weight: 600;
    color: #4f46e5;
}

.log-action {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.log-action.login {
    background: #dcfce7;
    color: #166534;
}

.log-action.register {
    background: #dbeafe;
    color: #1e40af;
}

.log-action.error {
    background: #fee2e2;
    color: #dc2626;
}

.log-action.profile {
    background: #fef3c7;
    color: #92400e;
}

.log-details {
    color: #6b7280;
}

.log-ip {
    font-family: monospace;
    color: #6b7280;
    font-size: 0.8rem;
}

.logs-loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.btn-close:hover {
    background: #f3f4f6;
}

.modal-body {
    padding: 1.5rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-buttons .btn {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .auth-section {
        padding: 6rem 1rem 2rem;
    }

    .auth-card {
        padding: 2rem;
    }

    .dashboard {
        padding: 6rem 1rem 2rem;
    }

    .dashboard-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profile-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .log-entry {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }

    .alert-container {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}