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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* background removed - handled by layout.php inline styles */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

h1 {
    color: white;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    color: rgba(255,255,255,0.9);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.auth-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: #1e3c72;
}

.tab-button.active {
    color: #1e3c72;
    border-bottom-color: #1e3c72;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

input[type="email"], input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

input[type="email"]:focus, input[type="text"]:focus {
    outline: none;
    border-color: #1e3c72;
}

button[type="submit"], .logout-btn, .btn-primary, .btn-secondary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.btn-secondary {
    background: linear-gradient(135deg, #546e7a 0%, #607d8b 100%);
}

button[type="submit"]:hover, .logout-btn:hover, .btn-primary:hover, .btn-secondary:hover {
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.4);
}

.message {
    display: none;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.95rem;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: 90%;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.message.info {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.dashboard {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 800px;
    margin: 0 auto;
}

.dashboard h1 {
    color: #333;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: none;
}

.dashboard h2 {
    color: #1e3c72;
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.user-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.user-info p {
    color: #666;
    font-size: 1rem;
}

.user-info strong {
    color: #333;
    font-weight: 600;
}

.welcome-message {
    text-align: center;
    margin: 30px 0;
}

.welcome-message p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 10px;
}

.settings-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.settings-section h3 {
    color: #1e3c72;
    margin-bottom: 15px;
}

.settings-form {
    margin-bottom: 20px;
}

.settings-form label {
    display: block;
    color: #333;
    margin-bottom: 5px;
    font-weight: 500;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-group button {
    flex: 1;
}

.credential-list {
    list-style: none;
    padding: 0;
}

.credential-item {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e0e0e0;
}

.credential-info {
    flex: 1;
}

.credential-name {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.credential-name:hover {
    color: #1e3c72;
}

.edit-icon {
    font-size: 0.9rem;
    opacity: 0.6;
}

.credential-name:hover .edit-icon {
    opacity: 1;
}

.credential-date {
    color: #666;
    font-size: 0.9rem;
}

.delete-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.delete-btn:hover {
    background: #d32f2f;
}

.logout-btn {
    margin-top: 20px;
}

footer {
    background: #1a2a4a;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-copyright {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

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

.modal-content h3 {
    color: #1e3c72;
    margin-bottom: 15px;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.modal-buttons button {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.modal-buttons button:last-child {
    background: linear-gradient(135deg, #546e7a 0%, #607d8b 100%);
}

.modal-buttons button:hover {
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.4);
}

.button-section {
    text-align: center;
    padding: 40px 20px;
    display: block;
}

.auth-button {
    font-size: 1.2rem;
    padding: 16px 40px;
    min-width: 200px;
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 300px;
}

.auth-button:first-child {
    margin-bottom: 16px;
}

.register-form {
    padding: 20px;
}

.register-form h2 {
    color: #1e3c72;
    text-align: center;
    margin-bottom: 20px;
}

.btn-link {
    background: linear-gradient(135deg, #546e7a 0%, #607d8b 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    display: block;
    margin: 20px auto 0;
    text-align: center;
    width: 100%;
    max-width: 300px;
    transition: box-shadow 0.2s;
}

.btn-link:hover {
    box-shadow: 0 5px 15px rgba(84, 110, 122, 0.4);
}

.help-text {
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
}

.alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-size: 0.95rem;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-warning h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #856404;
}

.alert-warning p {
    margin: 5px 0;
    line-height: 1.5;
}


.credential-header {
    margin-bottom: 10px;
}

.credential-header h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
}

.credential-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.credential-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: box-shadow 0.2s;
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-danger:hover:not(:disabled) {
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dashboard-sections {
    margin-top: 30px;
}

.section-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.section-card h3 {
    color: #1e3c72;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 1.3rem;
}

.credential-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.credential-card:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: box-shadow 0.3s;
}

.danger-section {
    border: 2px solid #dc3545;
    background: #fff5f5;
}

.danger-section h3 {
    color: #dc3545;
    border-bottom-color: #dc3545;
}

.danger-section .btn-danger {
    padding: 18px 36px;
    font-size: 1.1rem;
    white-space: nowrap;
}

.warning-text {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    .auth-container {
        padding: 20px;
    }
    
    .dashboard {
        padding: 25px;
    }
    
    .footer-links a {
        display: block;
        margin: 10px 0;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}