/* css/style.css - Updated with eye-friendly styling */
:root {
    --primary-color: #3a6ea5;
    --primary-hover: #2a5a8a;
    --secondary-color: #f5f7fa;
    --accent-color: #6cad50;
    --accent-hover: #5a9240;
    --danger-color: #d9534f;
    --danger-hover: #c82333;
    --text-color: #333;
    --light-text: #6c757d;
    --border-color: #d1d9e6;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f7fa;
    color: var(--text-color);
    padding: 0;
    margin: 0;
    font-size: 16px; /* Base font size increased for better readability */
}

/* Age-friendly header improvements */
header {
    background: linear-gradient(to bottom, #3a6ea5, #2a5a8a);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.main-nav {
    background-color: #f1f5f9;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.main-nav li {
    margin: 5px;
}

.nav-button {
    display: flex;
    align-items: center;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    min-width: 150px;
    text-align: center;
    justify-content: center;
}

.nav-button:hover {
    background-color: #e6f0ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.nav-button.active {
    background-color: #dae8fc;
    border-left: 4px solid #3a6ea5;
}

.add-part-button {
    background-color: #6cad50;
    color: white;
}

.add-part-button:hover {
    background-color: #5a9240;
}

.admin-button {
    background-color: #f0ad4e;
    color: white;
}

.admin-button:hover {
    background-color: #ec971f;
}

.user-info {
    margin-left: auto;
    background-color: #e9ecef;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.logout-button {
    background-color: #d9534f;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    margin-left: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.logout-button:hover {
    background-color: #c82333;
}

.icon-text {
    margin-left: 8px;
}

main {
    background: #fff;
    padding: 2rem;
    max-width: 90%; /* Adjust based on your preference */
    margin: 0 auto 2rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    min-height: 400px;
}

/* Buttons - larger, more visible, descriptive */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
    margin-right: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    min-width: 120px;
    text-align: center;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn svg {
    margin-right: 8px;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-success {
    background: var(--accent-color);
}

.btn-success:hover {
    background: var(--accent-hover);
}

/* Forms */
form div {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-color);
}

.form-control, input[type="text"], input[type="password"], input[type="email"], select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.05rem;
    transition: var(--transition);
    background-color: #fff;
    color: var(--text-color);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.form-control:focus, input[type="text"]:focus, input[type="password"]:focus,
input[type="email"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.25);
}

/* Tables - more readable, clearer distinctions */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    font-size: 1.05rem;
}

table, th, td {
    border: 1px solid var(--border-color);
}

th, td {
    padding: 15px 18px;
    text-align: left;
}

th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

tr:nth-child(even) {
    background-color: #f0f4f8;
}

tr:hover {
    background-color: rgba(58, 110, 165, 0.08);
}

/* Action buttons in tables */
.table-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    margin-right: 5px;
    font-weight: 500;
    transition: all 0.2s ease;
}


/* Search Form */
.search-form {
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.search-form .form-group {
    margin-bottom: 15px;
}

.search-form .btn {
    margin-top: 10px;
}

/* Alerts and Messages */
.alert {
    padding: 12px 15px;
    color: white;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.alert-danger {
    background-color: #fee2e2;
    color: #dc2626;
    border-left: 4px solid #dc2626;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
}

.alert-success {
    background-color: var(--accent-color);
}

.error {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 5px;
    font-weight: normal;
}

/* Form Groups and Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Location Selection */
.location-group {
    margin-bottom: 15px;
}

.location-select-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.location-select {
    flex-grow: 1;
}

.btn-small {
    padding: 6px 10px;
    background-color: #f0f0f0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
}

.btn-small:hover {
    background-color: #e0e0e0;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-hover);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* New Location Form */
.location-form {
    display: none;
    margin-top: 15px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #fff;
    box-shadow: var(--box-shadow);
}

.location-form.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.location-form h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--text-color);
    font-weight: 500;
}

/* Checkbox and Info Text */
.checkbox-group {
    margin: 15px 0;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    margin-bottom: 5px;
    cursor: pointer;
}

.info-text {
    margin-top: 5px;
    font-size: 14px;
    color: var(--light-text);
    font-style: italic;
    margin-left: 24px;
}

/* Success Message */
.success-message {
    padding: 15px;
    background-color: rgba(108, 173, 80, 0.15);
    color: #2c5e1a;
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}

/* Status indicators - clearer visual distinctions */
.public-tag {
    background-color: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-block;
}

.private-tag {
    background-color: #6c757d;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-block;
}

.note {
    color: var(--light-text);
    font-style: italic;
}

/* Foreign Parts Row */
.foreign-part {
    background-color: rgba(58, 110, 165, 0.05);
}

/* Authentication Pages */
.register-container, .login-container {
    max-width: 450px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.register-container h2, .login-container h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 500;
}

.btn-link {
    display: block;
    margin-top: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

.btn-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.edit-btn {
    background-color: #4dabf7;
}

.edit-btn:hover {
    background-color: #339af0;
}

.delete-btn {
    background-color: #fa5252;
}

.delete-btn:hover {
    background-color: #e03131;
}

.view-btn {
    background-color: #20c997;
}

.view-btn:hover {
    background-color: #12b886;
}

/* Authentifizierungseiten Styling */
.auth-background {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    display: flex;
    width: 900px;
    max-width: 100%;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.auth-card {
    flex: 1;
    padding: 3rem;
}

.auth-header {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.auth-header p {
    color: var(--light-text);
    font-size: 1.1rem;
}

.auth-brand {
    flex: 1;
    background: linear-gradient(135deg, #3a6ea5 0%, #2a5a8a 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,.1)' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.auth-brand h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-brand p {
    font-size: 1.2rem;
    max-width: 80%;
    text-align: center;
    opacity: 0.9;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
    width: 20px;
    height: 20px;
}

.input-with-icon .form-control {
    padding-left: 45px;
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.btn-block svg {
    margin-right: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
}

.auth-footer .btn-link {
    font-size: 1.05rem;
    margin-top: 0;
}


/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .nav-button {
        width: 100%;
        margin-bottom: 8px;
    }

    .user-info {
        flex-direction: column;
        align-items: center;
        margin-top: 15px;
        margin-left: 0;
        text-align: center;
    }

    .logout-button {
        margin-top: 10px;
        margin-left: 0;
    }

    main {
        padding: 1rem;
        margin: 0 1rem 1rem;
    }

    table {
        display: block;
        overflow-x: auto;
    }
    .auth-container {
        flex-direction: column-reverse;
        width: 100%;
    }

    .auth-brand {
        padding: 2rem;
    }

    .auth-card {
        padding: 2rem;
    }

    .auth-header h2 {
        font-size: 1.8rem;
    }
}


/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    color: var(--light-text);
    margin-top: 2rem;
    font-size: 0.9rem;
}