/* ==========================================================================
   Arbre Genealògic - Main Stylesheet
   Consolidated CSS for all pages
   ========================================================================== */

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1d1d1f;
    min-height: 100vh;
}

/* Background variants */
body.bg-light { background: #f5f5f7; }
body.bg-gradient { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   2. Typography & Colors
   ========================================================================== */
.text-muted { color: #6e6e73; }
.text-primary { color: #667eea; }
.text-dark { color: #1d1d1f; }

/* ==========================================================================
   3. Header & Navigation
   ========================================================================== */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px 0;
}

.header.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-content.narrow { max-width: 900px; }
.header-content.medium { max-width: 1200px; }

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
}
.logo:hover { color: #764ba2; }

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.back-link:hover { color: #764ba2; }

.back-link.btn-style {
    padding: 8px 20px;
    background: #f5f5f7;
    color: #1d1d1f;
    border-radius: 20px;
}
.back-link.btn-style:hover { background: #e5e5e7; }

/* User Info & Dropdown */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    color: #6e6e73;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}
.username:hover { color: #1d1d1f; }
.username::after {
    content: '▼';
    font-size: 0.7rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 2px solid #e5e5e7;
    border-radius: 12px;
    padding: 10px 0;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 180px;
}
.dropdown-menu.active { display: block; }

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #1d1d1f;
    text-decoration: none;
    transition: background 0.3s ease;
    font-size: 0.95rem;
}
.dropdown-menu a:hover { background: #f5f5f7; }

/* ==========================================================================
   4. Containers
   ========================================================================== */
.container-main { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; }
.container-branch { max-width: 1400px; margin: 0 auto; padding: 0 20px 60px; }
.container-form { max-width: 900px; margin: 0 auto; padding: 0 20px 60px; }
.container-pref { max-width: 600px; margin: 0 auto; padding: 0 20px 60px; }
.container-dashboard { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; }

/* Auth containers (login, register, forgot password) */
.auth-container,
.login-container,
.reset-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 50px;
    width: 100%;
    max-width: 450px;
    margin: 20px;
}

.register-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 50px;
    width: 100%;
    max-width: 850px;
    margin: 20px;
}

/* Form row for two columns layout */
.register-container .form-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 0;
    width: 100%;
}

.register-container .form-col {
    flex: 1 1 0;
    min-width: 0;
    width: 50%;
}

/* Register form specific styles */
.register-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
    width: 100%;
}

.register-form-col {
    flex: 1;
    min-width: 0;
}

@media (max-width: 500px) {
    .register-container .form-row {
        flex-direction: column !important;
        gap: 0;
    }
    
    .register-container .form-col {
        width: 100%;
    }
    
    .register-container {
        max-width: 850px;
        padding: 30px;
    }
}

.auth-header,
.login-header,
.register-header,
.reset-header {
    text-align: center;
    margin-bottom: 40px;
}
.auth-header h1,
.login-header h1,
.register-header h1,
.reset-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1d1d1f;
}
.auth-header p,
.login-header p,
.register-header p,
.reset-header p {
    color: #6e6e73;
    font-size: 1rem;
    line-height: 1.5;
}

/* Forgot password container */
.forgot-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 50px;
    width: 100%;
    max-width: 450px;
    margin: 20px;
}

.forgot-header {
    text-align: center;
    margin-bottom: 40px;
}
.forgot-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1d1d1f;
}
.forgot-header p {
    color: #6e6e73;
    font-size: 1rem;
    line-height: 1.5;
}

/* Edit containers */
.container-edit {
    max-width: 900px;
    margin: 80px auto 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */
.btn {
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-secondary {
    background: #f5f5f7;
    color: #1d1d1f;
}
.btn-secondary:hover {
    background: #e5e5e7;
    color: #1d1d1f;
}

.btn-success { background: #28a745; color: white; }
.btn-success:hover { background: #218838; color: white; }

.btn-warning { background: #ffc107; color: #1d1d1f; }
.btn-warning:hover { background: #e0a800; }

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

.btn-full { width: 100%; }

.btn-logout {
    padding: 8px 20px;
    background: #f5f5f7;
    color: #1d1d1f;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-logout:hover { background: #e5e5e7; color: #1d1d1f; }

/* Action buttons */
.btn-action {
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-primary-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.btn-primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-success-action {
    background: #28a745;
    color: white;
}
.btn-success-action:hover {
    background: #218838;
    transform: translateY(-2px);
    color: white;
}

.btn-secondary-action {
    background: #f5f5f7;
    color: #1d1d1f;
}
.btn-secondary-action:hover {
    background: #e5e5e7;
}

.btn-warning-action {
    background: #ffc107;
    color: #1d1d1f;
}
.btn-warning-action:hover {
    background: #e0a800;
}

.btn-remove {
    background: #bf2e3c;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-remove:hover {
    background: #c82333;
}

.btn-view {
    background: #667eea;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.btn-view:hover {
    background: #5568d3;
    color: white;
}

.btn-empty-state {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.btn-empty-state:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-new-branch {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-new-branch:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}

/* Page-specific buttons */
.btn-register,
.btn-login,
.btn-submit,
.btn-create {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.btn-register:hover,
.btn-login:hover,
.btn-submit:hover,
.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-save {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-delete {
    padding: 14px 28px;
    background: #fabcc4;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-delete-member {
    background: #fabcc4;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    box-sizing: border-box;
    font-size: 0.85rem;
}
.btn-delete-member:hover {
    background: #c82333;
}

/* ==========================================================================
   6. Forms
   ========================================================================== */
.form-group { margin-bottom: 25px; }
.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.label-optional {
    color: #6e6e73;
    font-weight: 400;
    font-size: 13px;
}

.form-control,
.form-control-elegant,
.form-control-modern,
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e5e5e7;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f5f5f7;
}

.form-control:focus,
.form-control-elegant:focus,
.form-control-modern:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

textarea.form-control-modern,
.form-textarea {
    min-height: 120px;
    resize: vertical;
}

select.form-control-modern { cursor: pointer; }

.form-hint {
    font-size: 0.85rem;
    color: #86868b;
    margin-top: 5px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #e5e5e7;
}

/* Form cards */
.form-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.form-header { text-align: center; margin-bottom: 40px; }

.form-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1d1d1f;
}

.form-subtitle {
    color: #6e6e73;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Checkbox modern */
.form-check-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f5f8fa;
    border-radius: 12px;
    margin-bottom: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.form-check-modern:hover { background: #e8f4ff; }
.form-check-modern input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    accent-color: #667eea;
}
.form-check-modern label {
    color: #1d1d1f;
    font-size: 15px;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

/* Captcha */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.captcha-image {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    align-items: center;
    background: #f5f8fa;
}

.captcha-refresh {
    background: #667eea;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}
.captcha-refresh:hover {
    background: #5568d3;
    transform: rotate(180deg);
}

/* ==========================================================================
   7. Alerts
   ========================================================================== */
.alert-elegant,
.alert-error {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    color: #c33;
    font-size: 0.95rem;
}

.alert-success {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 30px;
    color: #155724;
    font-size: 0.95rem;
}

.alert-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 30px;
    color: #856404;
}

/* Auto-dismiss animation for alerts */
@keyframes fade-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.alert-fade-out {
    animation: fade-out 0.5s ease-out forwards;
}

.cookie-notice {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    margin: 0;
    font-size: 0.85rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
    .cookie-notice {
        left: 24px;
        right: 24px;
        bottom: 24px;
    }
}

/* ==========================================================================
   8. Cards & Sections
   ========================================================================== */
.card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    padding: 30px;
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1d1d1f;
}

/* Branch header */
.branch-header {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.branch-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.branch-meta { color: #6e6e73; margin-bottom: 20px; }

.branch-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Branch cards */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.branch-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1d1d1f;
    display: block;
}
.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: #1d1d1f;
}

.branch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}

.branch-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    flex: 1;
}

.branch-owner {
    color: #6e6e73;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Branch info (members count) */
.branch-info {
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.branch-members {
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Members section */
.members-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

.members-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1d1d1f;
}

.search-box {
    padding: 12px 20px;
    border: 2px solid #e5e5e7;
    border-radius: 10px;
    font-size: 1rem;
    width: 250px;
    max-width: 100%;
    transition: all 0.3s ease;
}
.search-box:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.members-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Member row - single line display */
.member-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.member-row:hover {
    border-color: #667eea;
    background: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.12);
}

.member-name {
    font-weight: 600;
    font-size: 1rem;
    color: #1d1d1f;
    min-width: 180px;
    flex-shrink: 0;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    color: #6e6e73;
    font-size: 0.9rem;
}

.member-sex {
    font-size: 1rem;
}

.member-dates {
    color: #6e6e73;
}

.member-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-edit {
    background: #667eea;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    box-sizing: border-box;
}
.btn-edit:hover {
    background: #5568d3;
    color: white;
}

/* ==========================================================================
   9. Badges
   ========================================================================== */
.badge-elegant {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-public { background: #d4edda; color: #155724; }
.badge-private { background: #e5e5e7; color: #6e6e73; }

/* ==========================================================================
   10. Page Headers
   ========================================================================== */
.page-header { margin-bottom: 40px; }

.page-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1d1d1f;
}

.page-subtitle {
    color: #6e6e73;
    font-size: 1.1rem;
}

.dashboard-header { margin-bottom: 40px; }
.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.dashboard-header p {
    color: #6e6e73;
    font-size: 1.1rem;
}

.pref-header { margin-bottom: 40px; }
.pref-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1d1d1f;
}
.pref-header p { color: #6e6e73; font-size: 1rem; }

/* Preferences sections */
.pref-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1d1d1f;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Warning box for dangerous actions */
.warning-box {
    background: #fff5f5;
    border: 2px solid #fed7d7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.warning-box p {
    color: #c53030;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* Info box */
.info-box {
    background: #f0f4ff;
    border: 2px solid #d6e0ff;
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 25px;
    font-size: 0.9rem;
    color: #5c6ac4;
}
.info-box strong {
    color: #4c51bf;
}

/* Back section in preferences */
.back-section {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #e5e5e7;
}

/* Requirements box */
.requirements {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    font-size: 0.9rem;
    color: #6e6e73;
}
.requirements strong {
    color: #1d1d1f;
    display: block;
    margin-bottom: 10px;
}
.requirements ul {
    margin: 0;
    padding-left: 20px;
}
.requirements li {
    margin-bottom: 5px;
}

/* Login/Register links */
.login-link,
.register-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e5e5e7;
    font-size: 0.95rem;
    color: #6e6e73;
}
.login-link a,
.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}
.login-link a:hover,
.register-link a:hover {
    color: #5a6fd6;
}

/* Back home link in auth pages */
.back-home {
    text-align: center;
    margin-bottom: 30px;
}
.back-home a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.back-home a:hover {
    color: #5a6fd6;
}

/* ==========================================================================
   11. Action Bars
   ========================================================================== */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}
.action-bar .btn-create {
    width: auto;
}

/* ==========================================================================
   12. Collaborators
   ========================================================================== */
.collab-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.collab-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.collab-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.collab-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.collab-item {
    background: #f5f5f7;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   13. Empty States
   ========================================================================== */
.empty-state {
    background: white;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6e6e73;
    margin-bottom: 20px;
}

/* ==========================================================================
   14. Links
   ========================================================================== */
.auth-link {
    text-align: center;
    margin-top: 25px;
    color: #6e6e73;
    font-size: 0.95rem;
}
.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.auth-link a:hover { color: #764ba2; }

.back-home {
    text-align: center;
    margin-bottom: 20px;
}
.back-home a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}
.back-home a:hover { color: #764ba2; }

.requirements {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #6e6e73;
}
.requirements ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

/* ==========================================================================
   15. Homepage
   ========================================================================== */
.hero { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    color: white; 
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path fill="rgba(255,255,255,0.05)" d="M0,300 Q300,150 600,300 T1200,300 L1200,600 L0,600 Z"/></svg>') no-repeat center bottom;
    background-size: cover;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 40px 20px; }
.hero h1 { font-size: 3.5rem; font-weight: 700; margin-bottom: 20px; letter-spacing: -1px; }
.hero p { font-size: 1.4rem; margin-bottom: 40px; font-weight: 300; opacity: 0.95; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

.btn-hero { 
    padding: 15px 40px; 
    font-size: 1.1rem; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: 500; 
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn-hero-primary { 
    background: white; 
    color: #667eea; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.btn-hero-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    color: #667eea;
}
.btn-hero-secondary { 
    background: rgba(255,255,255,0.2); 
    color: white; 
    border: 2px solid white;
    backdrop-filter: blur(10px);
}
.btn-hero-secondary:hover { 
    background: rgba(255,255,255,0.3);
    color: white;
    transform: translateY(-2px);
}

/* Features Section */
.features { padding: 100px 20px; background: #f5f5f7; }
.features-container { max-width: 1200px; margin: 0 auto; }
.features h2 { 
    text-align: center; 
    font-size: 2.5rem; 
    margin-bottom: 60px; 
    font-weight: 600;
    color: #1d1d1f;
}
.features-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 40px; 
}
.feature-card { 
    background: white; 
    padding: 40px; 
    border-radius: 20px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.feature-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}
.feature-icon { font-size: 3rem; margin-bottom: 20px; }
.feature-card h3 { 
    font-size: 1.5rem; 
    margin-bottom: 15px; 
    font-weight: 600;
    color: #1d1d1f;
}
.feature-card p { color: #6e6e73; line-height: 1.6; font-size: 1.05rem; }

/* CTA Section */
.cta { 
    padding: 100px 20px; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center; 
    color: white; 
}
.cta h2 { font-size: 2.5rem; margin-bottom: 20px; font-weight: 600; }
.cta p { font-size: 1.2rem; margin-bottom: 40px; opacity: 0.95; }

/* Footer */
.footer { 
    padding: 40px 20px; 
    background: #1d1d1f; 
    color: #f5f5f7; 
    text-align: center; 
}
.footer p { opacity: 0.6; font-size: 0.9rem; }

/* Language Icons */
.language-icons {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}
.language-icons form { 
    margin: 0; 
    display: flex;
    gap: 8px;
}

.language-icon {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 36px;
}
.language-icon:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}
.language-icon.active {
    background: rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}
.language-icon svg {
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ==========================================================================
   16. Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .features h2, .cta h2 { font-size: 2rem; }
    .hero-buttons { flex-direction: column; }
    .btn-hero { width: 100%; }
    
    .page-title, .dashboard-header h1, .pref-header h1 { font-size: 2rem; }
    
    .header-content { gap: 10px; }
    
    .container-edit {
        padding: 30px 20px;
        margin: 70px 10px 0;
    }
    
    .form-title { font-size: 1.5rem; }
    .form-actions { flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    
    .branch-actions { flex-direction: column; }
    .branches-grid { grid-template-columns: 1fr; }
    
    .collab-form { flex-direction: column; }
    
    /* Member rows responsive */
    .member-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .member-name {
        min-width: auto;
        flex: 1 1 100%;
    }
    .member-info {
        flex: 1 1 auto;
    }
    .member-actions {
        margin-left: 0;
    }
}

/* ==========================================================================
   15. Natal Chart Styles
   ========================================================================== */

/* Botó Carta Natal a la llista de membres */
.btn-natal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    border: none;
}
.btn-natal:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Container principal */
.container-natal {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header de la carta natal - estil hero */
.natal-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 60px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}
.natal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path fill="rgba(255,255,255,0.05)" d="M0,300 Q300,150 600,300 T1200,300 L1200,600 L0,600 Z"/></svg>') no-repeat center bottom;
    background-size: cover;
}
.natal-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.natal-header h2 {
    font-size: 1.8rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 20px;
    position: relative;
}
.natal-birth-info {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    font-weight: 300;
}

/* Wrapper de la roda */
.natal-wheel-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    gap: 25px;
}

/* Roda natal SVG */
.natal-wheel-container {
    display: flex;
    justify-content: center;
    width: 100%;
}
.natal-wheel {
    max-width: 650px;
    width: 100%;
    height: auto;
    background: #f5f5f7;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Botó de descàrrega - estil consistent amb la resta de botons */
.btn-download-chart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}
.btn-download-chart:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.btn-download-chart svg {
    flex-shrink: 0;
}

/* Grid de targetes - estil feature-card */
.natal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Targetes de signes - estil feature-card */
.natal-card {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.natal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}
.natal-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.natal-symbol {
    font-size: 2.5rem;
}
.natal-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6e6e73;
    font-weight: 500;
}
.natal-sign {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.sign-symbol {
    font-size: 3rem;
}
.sign-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
}
.natal-details p {
    margin: 8px 0;
    color: #1d1d1f;
    font-size: 0.95rem;
}
.natal-details p strong {
    color: #6e6e73;
}
.natal-description {
    color: #6e6e73;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Badges de trets */
.natal-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.trait-badge {
    background: #f5f5f7;
    color: #1d1d1f;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Secció de planetes - estil feature */
.natal-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.natal-section h3 {
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
}
.planets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}
.planet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    background: #f5f5f7;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}
.planet-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.planet-symbol {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.planet-name {
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 5px;
    font-size: 0.95rem;
}
.planet-sign {
    font-size: 0.9rem;
    color: #6e6e73;
}

/* Nota informativa */
/* Grid de les 12 cases */
.houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}
.house-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    background: #f5f5f7;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}
.house-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.house-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}
.house-sign {
    font-size: 1rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 6px;
}
.house-meaning {
    font-size: 0.8rem;
    color: #6e6e73;
    line-height: 1.3;
}

/* Nota informativa */
.natal-note {
    background: #f5f5f7;
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 30px;
}
.natal-note p {
    margin: 0;
    color: #6e6e73;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Accions */
.natal-actions {
    text-align: center;
    margin-top: 40px;
}
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4c51bf;
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-back:hover {
    background: #4c51bf;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsiu */
@media (max-width: 768px) {
    .container-natal { padding: 20px 15px; }
    .natal-header { padding: 40px 20px; }
    .natal-header h1 { font-size: 1.8rem; }
    .natal-header h2 { font-size: 1.4rem; }
    .natal-grid { grid-template-columns: 1fr; gap: 20px; }
    .natal-card { padding: 25px; }
    .natal-wheel { max-width: 350px; }
    .natal-wheel-wrapper { padding: 25px; }
    .natal-section { padding: 25px; }
    .planets-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .planet-card { padding: 15px 10px; }
    .planet-symbol { font-size: 2rem; }
    .houses-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .house-card { padding: 15px 8px; }
    .house-number { font-size: 1.2rem; }
    .house-sign { font-size: 0.9rem; }
    .house-meaning { font-size: 0.75rem; }
}
