/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f9f0 100%);
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 120px);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo i {
    font-size: 2.2rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 300;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8f5e8;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card h2 {
    color: #27ae60;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Group Management */
.add-member {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.add-member input {
    flex: 1;
    min-width: 120px;
    padding: 12px 15px;
    border: 2px solid #e8f5e8;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.add-member input:focus {
    outline: none;
    border-color: #27ae60;
}

.add-member input[type="number"] {
    max-width: 100px;
}

/* Member List */
.member-list {
    display: grid;
    gap: 10px;
}

.member-item {
    background: #f8fdf8;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e8f5e8;
    transition: all 0.2s ease;
}

.member-item:hover {
    background: #f0f8f0;
    border-color: #d4e6d4;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.1);
}

.member-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* New member layout styles */
.member-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.member-name-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-name {
    font-weight: 500;
    color: #2c3e50;
}

.member-ratio {
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.member-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #27ae60;
    color: white;
}

.btn-primary:hover {
    background: #229954;
    transform: translateY(-1px);
}

.btn-success {
    background: #27ae60;
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-success:hover {
    background: #229954;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-edit {
    background: #3498db;
    color: white;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.btn-edit-expense {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.btn-edit-expense:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-edit-expense i {
    font-size: 0.9rem;
}

/* Form Styles */
.expense-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e8f5e8;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #27ae60;
}

/* Input with Button Layout */
.input-with-button {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.input-with-button input {
    flex: 1;
    margin-bottom: 0;
}

.btn-scan {
    padding: 12px 16px;
    white-space: nowrap;
    min-width: auto;
}

/* Delete Group Styles */
.danger-zone {
    border: 2px solid #e74c3c !important;
    background: linear-gradient(135deg, #ffeaea 0%, #fff5f5 100%) !important;
}

.danger-zone h3 {
    color: #e74c3c !important;
}

.warning-text {
    color: #c0392b;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.warning-text i {
    margin-right: 8px;
    color: #e74c3c;
}

.delete-confirmation {
    text-align: center;
    padding: 20px 0;
}

.warning-icon {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 20px;
}

.delete-confirmation h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.group-info {
    font-size: 1.1rem;
    color: #e74c3c;
    margin-bottom: 25px;
    padding: 10px;
    background: #ffeaea;
    border-radius: 8px;
}

.warning-list {
    text-align: left;
    margin: 25px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.warning-list p {
    margin: 10px 0;
    color: #e74c3c;
    font-weight: 500;
}

.warning-list i {
    margin-right: 10px;
    width: 16px;
}

.confirmation-input {
    margin-top: 25px;
}

.confirmation-input label {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 500;
}

.confirmation-input input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.confirmation-input input:focus {
    outline: none;
    border-color: #e74c3c;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-danger:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-danger-active {
    background: #c0392b !important;
    box-shadow: 0 0 10px rgba(192, 57, 43, 0.5) !important;
    animation: dangerPulse 2s infinite;
}

@keyframes dangerPulse {
    0% { box-shadow: 0 0 10px rgba(192, 57, 43, 0.5); }
    50% { box-shadow: 0 0 20px rgba(192, 57, 43, 0.8); }
    100% { box-shadow: 0 0 10px rgba(192, 57, 43, 0.5); }
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 30px;
    z-index: 1;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #27ae60;
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

/* Participants */
.participants {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8fdf8;
    border-radius: 8px;
    border: 1px solid #e8f5e8;
}

.participant-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #27ae60;
}

.participant-item label {
    margin: 0;
    cursor: pointer;
    flex: 1;
}

/* Custom Amounts */
.custom-amount-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.custom-amount-item label {
    min-width: 100px;
    margin: 0;
}

.custom-amount-item input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e8f5e8;
    border-radius: 6px;
}

.custom-total {
    margin-top: 15px;
    padding: 15px;
    background: #f8fdf8;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.remaining {
    font-weight: 500;
}

.remaining.error {
    color: #e74c3c;
}

.remaining.success {
    color: #27ae60;
}

/* Expense List */
.expense-list {
    display: grid;
    gap: 15px;
}

.expense-item {
    background: #f8fdf8;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e8f5e8;
}

.expense-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.expense-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
}

.expense-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: #27ae60;
}

.expense-details {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #7f8c8d;
}

.expense-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Results */
.results-section {
    margin-bottom: 30px;
}

.personal-summary {
    display: grid;
    gap: 15px;
}

.summary-item {
    background: #f8fdf8;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e8f5e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-item.total-expenses {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-item.total-expenses i {
    margin-right: 8px;
    color: #ecf0f1;
}

.total-amount {
    font-size: 1.2rem;
    font-weight: 700;
}

.summary-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #bdc3c7, transparent);
    margin: 15px 0;
}

/* Language Switcher */
.language-switcher {
    margin-right: 10px;
}

.language-switcher button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.language-switcher button:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.language-switcher button:active {
    transform: translateY(0);
}

.language-switcher #currentLang,
.language-switcher #currentLangGroup {
    font-weight: 600;
    font-size: 0.8rem;
}

/* Language Dropdown */
.language-dropdown {
    position: fixed !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    z-index: 999999 !important;
    min-width: 200px !important;
    padding: 8px 0 !important;
    overflow: hidden !important;
    animation: dropdownFadeIn 0.2s ease !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: 3px solid lime !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-option {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    gap: 12px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    color: white !important;
    font-size: 14px !important;
}

.language-option:last-child {
    border-bottom: none !important;
}

.language-option:hover {
    background: rgba(255,255,255,0.1) !important;
}

.language-option.active {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
}

.language-option .flag {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.language-option .name {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.language-option .fas {
    color: #27ae60;
    font-size: 0.9rem;
}

.language-option.active .fas {
    color: white;
}

/* Tablet optimization for member list */
@media (max-width: 1024px) and (min-width: 769px) {
    .member-item {
        padding: 13px;
    }
    
    .member-name {
        max-width: 160px;
        font-size: 0.95rem;
    }
    
    .member-ratio {
        padding: 3px 7px;
        font-size: 0.85rem;
    }
    
    .member-actions .btn-edit,
    .member-actions .btn-danger {
        padding: 7px 9px;
        font-size: 0.85rem;
        min-width: 34px;
        height: 34px;
    }
    
    .member-actions .btn-edit i,
    .member-actions .btn-danger i {
        font-size: 0.85rem;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .language-dropdown {
        min-width: 180px;
        right: 10px !important;
    }
    
    .language-option {
        padding: 10px 14px;
    }
    
    .language-option .name {
        font-size: 0.9rem;
    }
}

.person-summary {
    background: #f8fdf8;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e8f5e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.person-name {
    font-weight: 500;
    color: #2c3e50;
}

.person-balance {
    font-weight: 700;
    font-size: 1.1rem;
}

.person-balance.positive {
    color: #27ae60;
}

.person-balance.negative {
    color: #e74c3c;
}

.person-balance.neutral {
    color: #7f8c8d;
}

.transactions {
    display: grid;
    gap: 15px;
}

.transaction-item {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e8f5e8;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.transaction-item.paid {
    background: #f0f8f0;
    border-color: #27ae60;
    opacity: 0.8;
}

.transaction-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.transaction-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.transaction-amount {
    font-weight: 700;
    color: #27ae60;
    font-size: 1.1rem;
}

.transaction-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.paid-badge {
    background: #27ae60;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Payment Summary Styles */
.payment-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-item i {
    font-size: 1.2rem;
    opacity: 0.9;
}

.stat-item.paid i {
    color: #4CAF50;
}

.stat-item.unpaid i {
    color: #FF9800;
}

.all-paid-message {
    text-align: center;
    padding: 15px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    font-weight: 500;
}

.all-paid-message i {
    font-size: 1.5rem;
    margin-right: 8px;
    color: #FFD700;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e8f5e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #27ae60;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-modal:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.modal-content .expense-form {
    padding: 25px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-actions .btn {
    flex: 1;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.footer p {
    margin: 5px 0;
}

.footer i {
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .logo i {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .add-member {
        flex-direction: column;
    }
    
    .add-member input {
        min-width: auto;
    }
    
    .member-item {
        padding: 12px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        min-height: auto;
    }
    
    .member-info {
        flex: 1;
        min-width: 0; /* Allow text to shrink */
        gap: 8px;
        align-items: center;
    }
    
    .member-name {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
    
    .member-ratio {
        padding: 2px 6px;
        font-size: 0.8rem;
        border-radius: 4px;
        white-space: nowrap;
    }
    
    .member-actions {
        display: flex;
        gap: 4px;
        flex-shrink: 0;
    }
    
    .member-actions .btn-edit,
    .member-actions .btn-danger {
        padding: 6px 8px;
        font-size: 0.8rem;
        min-width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .member-actions .btn-edit i,
    .member-actions .btn-danger i {
        font-size: 0.8rem;
        margin: 0;
    }
    
    .expense-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .expense-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .expense-actions .btn {
        flex: 1;
    }
    
    .person-summary {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .transaction-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .transaction-actions {
        width: 100%;
        justify-content: center;
    }
    
    .payment-summary {
        padding: 15px;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-item {
        padding: 8px 12px;
    }
    
    .custom-total {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
        max-height: 96vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-content .expense-form {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .card h2 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
    }
    
    .expense-item {
        padding: 15px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-content .expense-form {
        padding: 15px;
    }
    
    /* Ultra compact member list for very small screens */
    .member-item {
        padding: 10px;
        gap: 6px;
    }
    
    .member-name {
        font-size: 0.85rem;
        max-width: 100px;
    }
    
    .member-ratio {
        padding: 2px 5px;
        font-size: 0.75rem;
    }
    
    .member-actions .btn-edit,
    .member-actions .btn-danger {
        padding: 5px 6px;
        font-size: 0.75rem;
        min-width: 28px;
        height: 28px;
    }
    
    .member-actions .btn-edit i,
    .member-actions .btn-danger i {
        font-size: 0.75rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-success {
    color: #27ae60;
}

.text-danger {
    color: #e74c3c;
}

.text-muted {
    color: #7f8c8d;
}

.hidden {
    display: none !important;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.3s ease-out;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f9f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8f5e8;
}

.login-form, .verify-form {
    display: grid;
    gap: 20px;
}

.form-hint {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Group Screen */
.group-screen {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f9f0 100%);
    min-height: 100vh;
}

.group-selection {
    display: grid;
    gap: 25px;
}

.group-form {
    display: grid;
    gap: 20px;
}

.group-form textarea {
    padding: 12px 15px;
    border: 2px solid #e8f5e8;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.group-form textarea:focus {
    outline: none;
    border-color: #27ae60;
}

/* My Groups */
.my-groups {
    display: grid;
    gap: 15px;
}

.group-item {
    background: #f8fdf8;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #e8f5e8;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.group-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.group-item.active {
    border-color: #27ae60;
    background: #f0f9f0;
}

.group-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.group-content {
    flex: 1;
    min-width: 0;
}

.owner-badge {
    color: #f39c12;
    margin-left: 8px;
    font-size: 0.9rem;
}

/* Activity Theme Colors */
.theme-travel .group-icon { background: linear-gradient(135deg, #3498db, #2980b9); }
.theme-food .group-icon { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.theme-shopping .group-icon { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.theme-entertainment .group-icon { background: linear-gradient(135deg, #f39c12, #d68910); }
.theme-home .group-icon { background: linear-gradient(135deg, #27ae60, #229954); }
.theme-work .group-icon { background: linear-gradient(135deg, #34495e, #2c3e50); }
.theme-sport .group-icon { background: linear-gradient(135deg, #1abc9c, #16a085); }
.theme-education .group-icon { background: linear-gradient(135deg, #e67e22, #d35400); }
.theme-health .group-icon { background: linear-gradient(135deg, #e91e63, #ad1457); }
.theme-party .group-icon { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }

.theme-travel { border-left: 4px solid #3498db; }
.theme-food { border-left: 4px solid #e74c3c; }
.theme-shopping { border-left: 4px solid #9b59b6; }
.theme-entertainment { border-left: 4px solid #f39c12; }
.theme-home { border-left: 4px solid #27ae60; }
.theme-work { border-left: 4px solid #34495e; }
.theme-sport { border-left: 4px solid #1abc9c; }
.theme-education { border-left: 4px solid #e67e22; }
.theme-health { border-left: 4px solid #e91e63; }
.theme-party { border-left: 4px solid #ff6b6b; }

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.group-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
}

.group-code-badge {
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.group-description {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.group-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* App Screen Header */
.app-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fdf8 100%);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8f5e8;
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #27ae60, #2ecc71, #3498db, #9b59b6);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    min-height: 64px;
    background: white;
    border-bottom: 1px solid #e8f5e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 101;
    margin: 0;
}

.group-info-container {
    padding: 25px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.group-title-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.group-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
    flex-shrink: 0;
}

.group-title-content {
    flex: 1;
}

.group-title {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.group-stats {
    display: flex;
    gap: 20px;
    color: #7f8c8d;
}

.group-code-section {
    margin-top: 20px;
}

.group-code-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.code-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-actions {
    display: flex;
    gap: 8px;
}

.group-code-display {
    text-align: center;
}

.group-code-text {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: bold;
    color: #27ae60;
    background: linear-gradient(135deg, #e8f5e8, #f0f9f0);
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px dashed #27ae60;
    display: inline-block;
    letter-spacing: 3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.group-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.95rem;
}

.group-code {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
}

.group-code strong {
    color: #27ae60;
    font-family: monospace;
    background: #f8fdf8;
    padding: 2px 6px;
    border-radius: 4px;
}

.member-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
}

.group-owner-info {
    color: #7f8c8d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid #ecf0f1;
}

.group-owner-info i {
    color: #f39c12;
    font-size: 0.8rem;
}

.owner-name {
    font-weight: 500;
    color: #34495e;
}

/* Member Selection */
.member-selection-card {
    border: 2px solid #27ae60;
    background: #f8fdf8;
}

.member-selection {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.member-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border: 2px solid #e8f5e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.member-option:hover {
    border-color: #27ae60;
}

.member-option.selected {
    border-color: #27ae60;
    background: #f0f9f0;
}

.member-option-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.member-option-name {
    font-weight: 500;
    color: #2c3e50;
}

.member-option-ratio {
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.member-option-select {
    color: #27ae60;
    font-size: 1.2rem;
}

.add-member-section {
    border-top: 1px solid #e8f5e8;
    padding-top: 20px;
    margin-top: 20px;
}

.add-member-section h3 {
    color: #27ae60;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.loading-spinner {
    text-align: center;
    color: #27ae60;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Online Status */
.online-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #27ae60;
}

.online-status.offline {
    color: #e74c3c;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #27ae60;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: #e74c3c;
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .login-card {
        padding: 25px 20px;
    }
    
    .header-top {
        padding: 0.75rem 1rem;
        min-height: 60px;
    }
    
    .group-info-container {
        padding: 20px;
    }
    
    .user-info {
        align-self: flex-end;
    }
    
    .group-title {
        font-size: 1.5rem;
    }
    
    .group-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .group-owner-info {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 5px;
        font-size: 0.8rem;
    }
    
    .member-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .member-option-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .add-member {
        flex-direction: column;
    }
    
    .group-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .group-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        align-self: center;
    }
    
    .group-content {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-top {
        padding: 0.6rem 0.8rem;
        min-height: 56px;
    }
    
    .group-info-container {
        padding: 15px;
    }
    
    .group-title {
        font-size: 1.3rem;
    }
    
    .member-option-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .group-item {
        padding: 15px;
    }
    
    .group-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Copy Success Animation */
.copy-success {
    animation: copyFeedback 0.6s ease;
}

@keyframes copyFeedback {
    0% {
        background: #27ae60;
        transform: scale(1);
    }
    50% {
        background: #2ecc71;
        transform: scale(1.1);
    }
    100% {
        background: #27ae60;
        transform: scale(1);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.expense-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.expense-header-right {
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-align: right;
}

.expense-item-time {
    font-size: 0.9em;
    color: #6c757d;
}

.expense-item-details {
    font-size: 0.9em;
    color: #555;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.close-modal-btn:hover {
    color: #333;
}

.modal-body .card {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

/* Member list in modal */
#settingsMemberList .member-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
}

#settingsMemberList .member-list-item:last-child {
    border-bottom: none;
}

.add-member-in-settings {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.add-member-in-settings h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
}

.settings-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
}

.settings-member-item:last-child {
    border-bottom: none;
}

/* ================================
   ENHANCED EXPENSE LIST STYLING 
   ================================ */

/* Date Group Backgrounds */
.date-group {
    margin-bottom: 25px;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.date-bg-1 { background: linear-gradient(135deg, #e8f5e8 0%, #f0f9f0 100%); }
.date-bg-2 { background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%); }
.date-bg-3 { background: linear-gradient(135deg, #fce4ec 0%, #fdf2f8 100%); }
.date-bg-4 { background: linear-gradient(135deg, #fff3e0 0%, #fffbf0 100%); }
.date-bg-5 { background: linear-gradient(135deg, #f3e5f5 0%, #faf5ff 100%); }

.date-header {
    margin: 0 0 15px 0 !important;
    padding: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid rgba(44, 62, 80, 0.1);
    text-align: center;
}

/* Enhanced Expense Items */
.expense-item {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px);
    margin-bottom: 15px;
}

.expense-item:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.expense-item-amount {
    color: #e74c3c !important;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Expense Detail Styling */
.expense-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.detail-label {
    font-weight: 500;
    color: #555;
    min-width: 100px;
    flex-shrink: 0;
}

/* Payer Tag Styling */
.payer-tag {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

/* Participants List */
.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.participant-tag {
    background: linear-gradient(135deg, #3498db, #5dade2);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* Creator Tag Styling */
.creator-tag {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(155, 89, 182, 0.3);
}

.no-participants {
    color: #95a5a6;
    font-style: italic;
    font-size: 0.85rem;
}

/* Permission Info Styling */
.permission-info {
    background: linear-gradient(135deg, #fff3cd 0%, #fef8e7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #856404;
}

.permission-info i {
    color: #f39c12;
    font-size: 1.1rem;
}

/* Responsive adjustments for expense list */
@media (max-width: 768px) {
    .date-group {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .expense-detail-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .participants-list {
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .date-group {
        padding: 12px;
    }
    
    .date-header {
        font-size: 1rem;
    }
    
    .payer-tag, .participant-tag, .creator-tag {
        font-size: 0.75rem;
        padding: 2px 8px;
    }
    
    .code-actions {
        gap: 4px;
    }
    
    .code-actions .btn-small {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ================================
   QR CODE MODAL STYLING 
   ================================ */

.qr-modal {
    max-width: 500px;
    text-align: center;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#qrcode {
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 3px solid #e8f5e8;
}

.qr-info {
    text-align: center;
}

.qr-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.qr-code-text {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #27ae60;
    margin-bottom: 10px;
}

.qr-instruction {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.qr-scanner-section {
    border-top: 1px solid #e8f5e8;
    padding-top: 20px;
    margin-top: 20px;
}

.qr-scanner-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#qrReader {
    margin: 15px 0;
    border-radius: 10px;
    overflow: hidden;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.scan-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
}

.scan-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.scan-result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Responsive for QR Modal */
@media (max-width: 768px) {
    .qr-modal {
        max-width: 95%;
        margin: 20px;
    }
    
    .qr-container {
        gap: 15px;
    }
    
    #qrcode {
        padding: 15px;
    }
    
    .group-title-section {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .group-icon-large {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .group-title {
        font-size: 1.6rem;
    }
    
    .group-code-text {
        font-size: 1.4rem;
        padding: 10px 15px;
        letter-spacing: 2px;
    }
    
    .code-actions {
        gap: 6px;
    }
    
    .code-actions .btn-small {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* ================================
   ADMOB & GDPR STYLING 
   ================================ */

/* GDPR Consent Banner */
.gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    z-index: 10000;
    border-top: 3px solid #3498db;
    backdrop-filter: blur(10px);
}

.gdpr-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.gdpr-text h4 {
    margin: 0 0 8px 0;
    color: #3498db;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gdpr-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #bdc3c7;
}

.gdpr-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-link {
    background: none;
    border: 1px solid #7f8c8d;
    color: #bdc3c7;
}

.btn-link:hover {
    background: #7f8c8d;
    color: white;
}

/* Ad Containers */
.ad-container {
    margin: 25px 0;
    text-align: center;
    border: 1px solid #e8f5e8;
    border-radius: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #f8fdf8 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.ad-container:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.ad-label {
    font-size: 11px;
    color: #95a5a6;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.ad-label::before,
.ad-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e8f5e8, transparent);
}

.ad-container ins {
    display: block !important;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
}

/* Footer */
.app-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    margin-top: 50px;
    border-top: 3px solid #27ae60;
}

/* Footer Statistics Section */
.footer-stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px 0;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-stats h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
}

.footer-stats h3 i {
    margin-right: 10px;
    color: #FFD700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.2rem;
    color: #333;
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Footer Content */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-links .separator {
    margin: 0 15px;
    color: #7f8c8d;
}

.footer-info p {
    margin: 0;
    color: #95a5a6;
    font-size: 0.85rem;
}

/* Responsive Footer Stats */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .stat-icon i {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .footer-stats h3 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .footer-stats {
        padding: 20px 0;
    }
    
    .stat-item {
        padding: 10px;
    }
}

/* Responsive GDPR & Ads */
@media (max-width: 768px) {
    .gdpr-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .gdpr-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .gdpr-text h4 {
        font-size: 1rem;
        justify-content: center;
    }
    
    .gdpr-text p {
        font-size: 0.9rem;
    }
    
    .ad-container {
        margin: 20px 0;
        padding: 12px;
    }
    
    .footer-links .separator {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .gdpr-banner {
        padding: 15px;
    }
    
    .gdpr-buttons {
        gap: 8px;
    }
    
    .gdpr-buttons .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .ad-container {
        margin: 15px 0;
        padding: 10px;
    }
    
    .ad-label {
        font-size: 10px;
    }
    
    .footer-content {
        padding: 0 15px;
    }
    
    .footer-links {
        margin-bottom: 10px;
    }
    
    .footer-links a {
        font-size: 0.8rem;
    }
    
    .footer-links .separator {
        margin: 0 8px;
    }
}

/* Member Selection Modal */
.member-selection-list {
    margin-bottom: 20px;
}

.available-members h4 {
    color: #27ae60;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.available-members h4::before {
    content: "👥";
    font-size: 1.2rem;
}

.member-option {
    background: #f8fdf8;
    border: 2px solid #e8f5e8;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-option:hover {
    background: #e8f5e8;
    border-color: #27ae60;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.15);
}

.member-option .member-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-option .member-info strong {
    color: #2c3e50;
    font-size: 1.1rem;
}

.member-option .member-ratio {
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.member-option i {
    color: #27ae60;
    font-size: 1.2rem;
}

.or-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e8f5e8;
}

.or-divider span {
    background: white;
    padding: 0 15px;
    color: #7f8c8d;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.add-new-member {
    background: #f8fdf8;
    border: 2px dashed #e8f5e8;
    border-radius: 12px;
    padding: 20px;
}

.add-new-member h4 {
    color: #27ae60;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-new-member h4::before {
    content: "➕";
    font-size: 1.1rem;
}

.add-new-member .form-group {
    margin-bottom: 15px;
}

.add-new-member .form-group:last-of-type {
    margin-bottom: 20px;
}

.add-new-member label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

.add-new-member input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8f5e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.add-new-member input:focus {
    outline: none;
    border-color: #27ae60;
}

.add-new-member .btn {
    width: 100%;
    justify-content: center;
}

@media (max-width: 768px) {
    .member-option {
        padding: 12px;
    }
    
    .member-option .member-info {
        gap: 8px;
    }
    
    .member-option .member-info strong {
        font-size: 1rem;
    }
    
    .add-new-member {
        padding: 15px;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }
}

/* Add Members Section in Create Group */
.add-members-section {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #f8fdf8 0%, #f0f9f0 100%);
    border-radius: 15px;
    border: 1px solid #e8f5e8;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.08);
    transition: all 0.3s ease;
}

.add-members-section:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.12);
}

.add-members-section h3 {
    color: #27ae60;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-members-section h3 i {
    font-size: 1.1rem;
}

.section-hint {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border-left: 3px solid #27ae60;
}

.create-group-members {
    margin-bottom: 20px;
    min-height: 20px;
}

.create-group-member-item {
    background: white;
    padding: 15px 18px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border: 1px solid #e8f5e8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.create-group-member-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #27ae60;
}

.create-group-member-item:last-child {
    margin-bottom: 0;
}

.create-group-member-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.create-group-member-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.create-group-member-ratio {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.2);
}

.add-member-form {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e8f5e8;
    transition: all 0.3s ease;
}

.add-member-form:hover {
    border-color: #27ae60;
    background: #fafffe;
}

.add-member-inputs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: stretch;
}

.add-member-inputs .btn {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    font-weight: 600;
    white-space: nowrap;
}

.member-name-input {
    flex: 1;
    min-width: 180px;
    padding: 12px 16px;
    border: 2px solid #e8f5e8;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
}

.member-name-input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
    transform: translateY(-1px);
}

.member-ratio-input {
    width: 90px;
    padding: 12px 16px;
    border: 2px solid #e8f5e8;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.member-ratio-input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
    transform: translateY(-1px);
}

.remove-member-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-member-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.remove-member-btn i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .add-members-section {
        margin-top: 20px;
        padding: 20px;
    }
    
    .add-member-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .member-name-input {
        min-width: auto;
        width: 100%;
    }
    
    .member-ratio-input {
        width: 100%;
        min-width: auto;
    }
    
    .create-group-member-item {
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .create-group-member-info {
        flex: 1;
        min-width: 0;
    }
    
    .create-group-member-name {
        font-size: 0.95rem;
    }
    
    .add-member-form {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .add-members-section {
        padding: 15px;
        margin-top: 15px;
    }
    
    .add-members-section h3 {
        font-size: 1.1rem;
    }
    
    .section-hint {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .create-group-member-item {
        padding: 10px 12px;
    }
    
    .create-group-member-name {
        font-size: 0.9rem;
    }
    
    .create-group-member-ratio {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    .add-member-form {
        padding: 12px;
    }
    
    .member-name-input,
    .member-ratio-input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
} 

/* ===== HAMBURGER MENU STYLES ===== */

/* Professional Header Styles */
.header .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    min-height: 64px;
    background: white;
    border-bottom: 1px solid #e8f5e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 100;
    overflow: visible !important;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    margin-left: auto;
}

.app-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: #27ae60;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.app-logo:hover {
    color: #229954;
}

.app-logo i {
    font-size: 1.9rem;
}

/* Professional User Profile */
.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.9rem;
    background: linear-gradient(135deg, #f8fdf8 0%, #f0f9f0 100%);
    border-radius: 25px;
    font-size: 0.875rem;
    border: 1px solid #e8f5e8;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.user-profile-mini:hover {
    background: linear-gradient(135deg, #f0f9f0 0%, #e8f5e8 100%);
    border-color: #d4e6d4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.1);
}

.user-profile-mini img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #e8f5e8;
    transition: border-color 0.3s ease;
}

.user-profile-mini:hover img {
    border-color: #27ae60;
}

.user-profile-mini .user-name {
    font-weight: 600;
    color: #2c3e50;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* Professional Menu Toggle Button */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    margin-left: 0.5rem;
}

.menu-toggle:hover {
    background: linear-gradient(135deg, #f0f9f0 0%, #e8f5e8 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.1);
}

.hamburger-line {
    width: 22px;
    height: 2.5px;
    background: #2c3e50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.menu-toggle.active {
    background: linear-gradient(135deg, #f0f9f0 0%, #e8f5e8 100%);
}

.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: #27ae60;
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: #27ae60;
}

/* Professional Dropdown Menu */
.dropdown-menu {
    position: fixed;
    top: 75px;
    right: 15px;
    width: 320px;
    background: white;
    border: 1px solid #e8f5e8;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 4px 16px rgba(39, 174, 96, 0.08);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
}

.dropdown-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    display: block !important;
    position: fixed !important;
    z-index: 999999 !important;
}

.menu-section {
    padding: 1.25rem 1.5rem;
}

.menu-section:first-child {
    padding-top: 1.5rem;
}

.menu-section:last-child {
    padding-bottom: 1.5rem;
}

.menu-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7f8c8d;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    width: 100%;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.925rem;
    font-weight: 500;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4px;
    position: relative;
}

.menu-item:hover {
    background: linear-gradient(135deg, #f8fdf8 0%, #f0f9f0 100%);
    color: #27ae60;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.1);
}

.menu-item.danger {
    color: #e74c3c;
}

.menu-item.danger:hover {
    background: linear-gradient(135deg, #fdf2f2 0%, #fbeaea 100%);
    color: #c0392b;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.1);
}

.menu-item i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.menu-item:hover i {
    transform: scale(1.1);
}

.menu-divider {
    height: 1px;
    background: #ecf0f1;
    margin: 0.5rem 1rem;
}

/* Language Options */
.language-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.language-item {
    justify-content: space-between;
    position: relative;
    padding: 0.6rem 0.75rem;
}

.language-item .flag {
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.language-item .checkmark {
    opacity: 0;
    color: #27ae60;
    transition: opacity 0.2s;
    font-size: 0.8rem;
}

.language-item.active {
    background: #e8f5e8;
    color: #27ae60;
}

.language-item.active .checkmark {
    opacity: 1;
}

/* Mobile Language Optimization */
.mobile-language-toggle {
    display: none;
}

/* Ghost Button Style */
.btn-ghost {
    background: none;
    border: none;
    color: #7f8c8d;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-ghost:hover {
    background: #f0f9f0;
    color: #27ae60;
}

/* Tablet and Mobile Responsive */
@media (max-width: 1024px) {
    /* Hide individual language options on tablet and mobile */
    .language-options {
        display: none !important;
    }
    
    /* Show mobile language toggle */
    .mobile-language-toggle {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        text-align: left;
        background: none !important;
        border: none !important;
        padding: 0.75rem !important;
        color: #2c3e50 !important;
        font-size: 0.9rem !important;
        border-radius: 8px !important;
        transition: all 0.2s !important;
        cursor: pointer !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    
    .mobile-language-toggle:hover,
    .mobile-language-toggle:focus,
    .mobile-language-toggle:active {
        background: #f8fdf8 !important;
        color: #27ae60 !important;
        outline: none !important;
    }
    
    .mobile-language-toggle i.fa-chevron-right {
        margin-left: auto !important;
        opacity: 0.6 !important;
        font-size: 0.8rem !important;
    }
    
    .mobile-language-toggle i.fa-globe {
        margin-right: 0.5rem !important;
    }
    
    /* Ensure language dropdown created by JavaScript is always visible on mobile */
    #languageDropdown {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        z-index: 999999 !important;
        top: 65px !important;
        right: 10px !important;
        left: 10px !important;
        min-width: auto !important;
        max-width: calc(100vw - 20px) !important;
        width: calc(100vw - 20px) !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
        padding: 8px 0 !important;
        transform: none !important;
    }
    
    #languageDropdown .language-option {
        display: flex !important;
        align-items: center !important;
        padding: 12px 16px !important;
        cursor: pointer !important;
        color: white !important;
        gap: 10px !important;
        transition: background-color 0.2s ease !important;
        font-size: 14px !important;
    }
    
    #languageDropdown .language-option:hover {
        background-color: rgba(255,255,255,0.1) !important;
    }
    
    #languageDropdown .language-option.active {
        background-color: rgba(255,255,255,0.2) !important;
    }
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 32px rgba(39, 174, 96, 0.4), 0 6px 16px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
}

.fab:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

.fab i {
    transition: transform 0.3s ease;
}

.fab:hover i {
    transform: rotate(90deg);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header .header-top,
    .app-header     .header-top {
        padding: 0.75rem 1rem;
        min-height: 60px;
        position: relative;
        z-index: 101;
    }
    
    .dropdown-menu {
        right: 8px;
        width: calc(100vw - 24px);
        max-width: 300px;
        top: 68px;
        border-radius: 14px;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .user-profile-mini {
        padding: 0.35rem 0.7rem;
        gap: 0.4rem;
    }
    
    .user-profile-mini .user-name {
        display: none;
    }
    
    .user-profile-mini img {
        width: 26px;
        height: 26px;
    }
    
    .app-logo {
        font-size: 1.6rem;
    }
    
    .app-logo i {
        font-size: 1.75rem;
    }
    
    .menu-toggle {
        padding: 0.5rem;
        position: relative !important;
        z-index: 999999 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
    }
    
    .menu-section {
        padding: 1rem;
    }
    
    .menu-section-title {
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
        letter-spacing: 0.6px;
    }
    
    .menu-item {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
        gap: 0.75rem;
    }
    
    .menu-item i {
        width: 16px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .header .header-top,
    .app-header .header-top {
        padding: 0.6rem 0.8rem;
        min-height: 56px;
        position: relative;
        z-index: 101;
    }
    
    .dropdown-menu {
        right: 6px;
        width: calc(100vw - 16px);
        max-width: 280px;
        top: 62px;
        border-radius: 12px;
        max-height: 75vh;
        overflow-y: auto;
    }
    
    .user-profile-mini {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }
    
    .user-profile-mini .user-name {
        display: none;
    }
    
    .user-profile-mini img {
        width: 24px;
        height: 24px;
    }
    
    .app-logo {
        font-size: 1.4rem;
    }
    
    .app-logo i {
        font-size: 1.6rem;
    }
    
    .menu-toggle {
        padding: 0.4rem;
        margin-left: 0.3rem;
        position: relative !important;
        z-index: 999999 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    .hamburger-line {
        width: 18px;
        height: 2px;
    }
    
    .menu-section {
        padding: 0.875rem 1rem;
    }
    
    .menu-section:first-child {
        padding-top: 1.125rem;
    }
    
    .menu-section:last-child {
        padding-bottom: 1.125rem;
    }
    
    .menu-section-title {
        font-size: 0.65rem;
        margin-bottom: 0.6rem;
        letter-spacing: 0.5px;
    }
    
    .menu-item {
        padding: 0.7rem 0.8rem;
        font-size: 0.875rem;
        gap: 0.65rem;
        margin-bottom: 3px;
    }
    
    .menu-item i {
        width: 15px;
        font-size: 0.875rem;
    }
    
    /* FAB on mobile */
    .fab {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
    
    /* Language dropdown adjustments for small mobile screens */
    #languageDropdown {
        top: 60px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: calc(100vw - 20px) !important;
        min-width: auto !important;
        width: calc(100vw - 20px) !important;
    }
}

/* Account Management Styles */
.ad-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 0;
    text-align: center;
    color: white;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ad-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.ad-banner i {
    font-size: 18px;
    color: #f1c40f;
}

.ad-banner span {
    font-size: 14px;
    font-weight: 500;
}

.ad-banner button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ad-banner button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Account Limit Warning */
.account-limit-warning,
.account-limit-info {
    margin-bottom: 15px;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert i {
    font-size: 16px;
}

.alert .btn {
    margin-left: auto;
    font-size: 12px;
    padding: 5px 12px;
}

/* User Profile Enhanced */
.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-direction: column;
    min-width: 120px;
}

.user-profile-mini:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-profile-mini img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile-mini > i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: center;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-account-type {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 60px;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Upgrade Modal */
.upgrade-modal {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.current-plan {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.plan-name {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upgrade-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.plan-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #ddd;
}

.plan-card.free::before {
    background: #95a5a6;
}

.plan-card.pro::before {
    background: #3498db;
}

.plan-card.premium::before {
    background: #e74c3c;
}

.plan-card.current {
    border-color: #27ae60;
    background: #f8fff9;
}

.plan-card:hover:not(.current) {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.plan-header {
    text-align: center;
    margin-bottom: 20px;
}

.plan-header {
    position: relative;
}

.plan-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: bold;
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge.recommended {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.plan-badge.best-value {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.plan-price {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.plan-features {
    margin-bottom: 25px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.feature i {
    color: #27ae60;
    width: 16px;
}

.plan-action {
    text-align: center;
}

.plan-action .btn {
    width: 100%;
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
}

/* Admin Panel */
.admin-modal {
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.stat-card i {
    font-size: 28px;
    opacity: 0.8;
}

.admin-section {
    margin-bottom: 30px;
}

.admin-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-user-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.admin-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.admin-user-item:hover {
    background-color: #f8f9fa;
}

.admin-user-item:last-child {
    border-bottom: none;
}

.admin-user-item .user-info {
    flex: 1;
}

.admin-user-item .user-name {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 2px;
}

.admin-user-item .user-email {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 2px;
}

.admin-user-item .user-date {
    font-size: 12px;
    color: #95a5a6;
}

.user-account select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 120px;
}

/* Mobile Responsive for Account Management */
@media (max-width: 768px) {
    .upgrade-plans {
        grid-template-columns: 1fr;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .user-account {
        width: 100%;
    }
    
    .user-account select {
        width: 100%;
    }
    
    .ad-banner {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .user-profile-mini {
        flex-direction: row;
        min-width: auto;
        padding: 6px 8px;
        gap: 8px;
    }
    
    .user-info {
        text-align: left;
    }
    
    .user-actions {
        margin-top: 0;
        margin-left: 8px;
    }
}

/* Subscription Status Styles */
.subscription-status {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.subscription-status.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.subscription-status.status-expiring_soon {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.subscription-status.status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.subscription-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.subscription-info-modal {
    margin-top: 10px;
    padding: 15px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

/* Usage Progress Styles */
.usage-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.usage-progress {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.upgrade-suggestion {
    margin-top: 10px;
    padding: 10px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.upgrade-suggestion span {
    color: #d97706;
    font-weight: 500;
}

/* Enhanced Plan Cards */
.plan-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #e5e7eb;
    transition: all 0.3s ease;
}

.plan-card.free::before {
    background: linear-gradient(90deg, #6b7280, #9ca3af);
}

.plan-card.pro::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.plan-card.premium::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.plan-card.current {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.02);
    transform: scale(1.02);
}

.plan-card:hover:not(.current) {
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.plan-badge {
    position: absolute;
    top: -1px;
    right: 24px;
    padding: 6px 12px;
    border-radius: 0 0 8px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge.recommended {
    background: #3b82f6;
    color: white;
}

.plan-badge.best-value {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.plan-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.plan-price .price {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
}

.plan-price .period {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.feature.main-feature {
    background: rgba(59, 130, 246, 0.05);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    font-weight: 600;
    color: #1d4ed8;
}

.feature.main-feature i {
    color: #3b82f6;
}

/* Usage Stats */
.usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    background: rgba(248, 250, 252, 0.7);
    border-radius: 12px;
    margin: 20px 0;
}

.usage-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.usage-stats .stat-item i {
    color: #3b82f6;
    font-size: 1.2rem;
}

/* Upgrade Benefits */
.upgrade-benefits {
    margin-top: 30px;
    padding: 24px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.upgrade-benefits h4 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.benefit:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.benefit i {
    color: #16a34a;
    font-size: 1.1rem;
}

.benefit span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

/* Contact Info Section */
.contact-info {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.contact-info h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info h4 i {
    color: #27ae60;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #27ae60;
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.contact-item:first-child .contact-icon {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.contact-item:last-child .contact-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.contact-details {
    flex: 1;
}

.contact-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-link {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #27ae60;
}

.contact-note {
    margin: 0;
    padding: 15px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #27ae60;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.contact-note i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Enhanced Admin Panel */
.admin-modal {
    max-width: 1200px;
    max-height: 90vh;
    width: 95vw;
    overflow-y: auto;
}

.admin-info {
    margin-bottom: 20px;
}

.admin-alert {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.admin-alert i {
    color: #3b82f6;
}

/* Admin account type styling */
.user-account-type {
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    display: inline-block;
}

/* Special styling for different account types */
.user-account-type[data-type="free"] {
    background: #6b7280;
    color: white;
}

.user-account-type[data-type="pro"] {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.user-account-type[data-type="premium"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.user-account-type[data-type="admin"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 3px 6px rgba(102, 126, 234, 0.4);
    font-weight: 600;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-account-type[data-type="admin"]::before {
    content: '👑 ';
    margin-right: 4px;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
}

/* Admin Modal Visibility */
.modal-overlay {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    display: flex !important;
    opacity: 1;
}

/* Enhanced Status Badges for System Management */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.status-badge.unregistered {
    background: #9ca3af;
    color: white;
}

.status-badge.inactive {
    background: #ef4444;
    color: white;
}

.status-badge.expiring {
    background: #f59e0b;
    color: white;
}

.status-badge.expired {
    background: #dc2626;
    color: white;
}

/* Enhanced Admin User Item Styles */
.admin-user-item.unregistered {
    background: rgba(156, 163, 175, 0.1);
    border-left: 4px solid #9ca3af;
}

.admin-user-item.inactive {
    opacity: 0.7;
}

.unregistered-actions {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.user-aliases {
    margin-top: 4px;
    opacity: 0.7;
}

.user-aliases small {
    font-style: italic;
    color: #6b7280;
}

.admin-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.admin-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
}

.admin-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-tab:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.admin-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.user-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.user-filters select,
.user-filters input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 150px;
}

.user-filters input {
    flex: 1;
    min-width: 200px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.warning {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.02);
}

.stat-card.warning i {
    color: #f59e0b;
}

.stat-card i {
    font-size: 1.5rem;
    color: #3b82f6;
    width: 40px;
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

/* Enhanced User List */
.admin-user-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: all 0.3s ease;
}

.admin-user-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.admin-user-item.inactive {
    opacity: 0.7;
    background: rgba(248, 250, 252, 0.5);
}

.admin-user-item.expiring {
    border-left: 4px solid #f59e0b;
    background: rgba(245, 158, 11, 0.02);
}

.admin-user-item.expired {
    border-left: 4px solid #ef4444;
    background: rgba(239, 68, 68, 0.02);
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #111827;
    font-size: 1.1rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-email {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.user-details {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #9ca3af;
}

.user-details span {
    padding: 2px 8px;
    background: rgba(243, 244, 246, 0.8);
    border-radius: 4px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.status-badge.expiring {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-badge.expired {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-actions select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 0.9rem;
}

.user-actions select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive Updates */
@media (max-width: 768px) {
    .usage-stats {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
        gap: 12px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .admin-user-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .user-actions {
        justify-content: space-between;
    }
    
    .subscription-info {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .upgrade-suggestion {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    /* Contact Info Mobile */
    .contact-info {
        padding: 20px;
        margin-top: 25px;
    }

    .contact-info h4 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .contact-item {
        padding: 12px;
        gap: 12px;
    }

    .contact-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .contact-link {
        font-size: 15px;
    }

    .contact-note {
        padding: 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .plan-card {
        padding: 16px;
    }
    
    .upgrade-benefits {
        padding: 16px;
    }
    
    .user-details {
        flex-direction: column;
        gap: 4px;
    }
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
    /* Container và layout chính */
    .container {
        padding: 10px;
        margin: 0;
        max-width: 100%;
        min-height: calc(100vh - 80px);
    }

    /* Header cải thiện */
    .header {
        margin-bottom: 15px;
        padding: 10px 0;
    }

    .logo {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .logo i {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    /* Card styling cải thiện */
    .card {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .card h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .card h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    /* Add member section */
    .add-member {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 15px;
    }

    .add-member input {
        width: 100%;
        min-width: auto;
        padding: 10px 12px;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    .add-member input[type="number"] {
        max-width: 100%;
    }

    /* Member list cải thiện */
    .member-item {
        padding: 12px;
        border-radius: 8px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .member-info {
        width: 100%;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .member-info-row {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .member-name-section {
        width: 100%;
        justify-content: space-between;
    }

    .member-name {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .member-ratio {
        padding: 3px 6px;
        font-size: 0.8rem;
        border-radius: 4px;
    }

    .member-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
        margin-top: 5px;
    }

    .member-actions .btn-edit,
    .member-actions .btn-danger {
        padding: 6px 10px;
        font-size: 0.8rem;
        border-radius: 6px;
        min-width: 60px;
    }

    .member-actions .btn-edit i,
    .member-actions .btn-danger i {
        font-size: 0.8rem;
    }

    /* Button styling cải thiện */
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        border-radius: 8px;
        gap: 6px;
    }

    .btn-small {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* Form styling */
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    /* Expense list */
    .expense-item {
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .expense-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .expense-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }

    .expense-actions .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* Transaction và summary */
    .person-summary {
        padding: 12px;
        margin-bottom: 10px;
    }

    .transaction-item {
        padding: 10px;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .transaction-info {
        width: 100%;
        justify-content: space-between;
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .transaction-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 5px;
    }

    /* Payment summary */
    .payment-summary {
        padding: 12px;
    }

    .summary-stats {
        flex-direction: column;
        gap: 8px;
    }

    .stat-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* Modal styling */
    .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        border-radius: 12px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 15px;
        border-radius: 12px 12px 0 0;
    }

    .modal-content .expense-form {
        padding: 15px;
    }

    .modal-actions {
        padding: 15px;
        gap: 8px;
    }

    /* Custom styling cho các element khác */
    .custom-total {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    /* Group management */
    .group-item {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 8px;
    }

    .group-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .group-content {
        margin-left: 10px;
    }

    /* Language dropdown */
    .language-dropdown {
        right: 10px;
        width: calc(100vw - 20px);
        max-width: 250px;
    }

    .language-option {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .language-option .name {
        font-size: 0.85rem;
    }
}

/* Cải thiện cho màn hình rất nhỏ */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .card {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 10px;
    }

    .card h2 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .logo {
        font-size: 1.8rem;
    }

    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select {
        padding: 9px 10px;
        font-size: 0.9rem;
    }

    .member-item {
        padding: 10px;
    }

    .member-name {
        font-size: 0.9rem;
    }

    .member-ratio {
        padding: 2px 5px;
        font-size: 0.75rem;
    }

    .member-actions .btn-edit,
    .member-actions .btn-danger {
        padding: 5px 8px;
        font-size: 0.75rem;
        min-width: 50px;
    }

    .modal-content {
        margin: 5px;
        max-width: calc(100vw - 10px);
    }

    .modal-header,
    .modal-content .expense-form,
    .modal-actions {
        padding: 12px;
    }

    /* Responsive text sizes */
    .expense-item-amount {
        font-size: 0.9rem;
    }

    .transaction-text {
        font-size: 0.85rem;
    }

    .stat-item {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* Nút FAB cho mobile nhỏ */
    .fab {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* ========================================
   🎨 MOBILE UI ENHANCEMENTS (OVERRIDE)
   ======================================== */

/* Mobile-first responsive improvements */
@media screen and (max-width: 768px) {
    /* Force better mobile layout */
    .container {
        padding: 8px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Improved card layout for mobile */
    .card {
        margin-bottom: 12px !important;
        padding: 12px !important;
        border-radius: 10px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    }

    /* Better typography on mobile */
    .card h2 {
        font-size: 1.1rem !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
    }

    .card h3 {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
        line-height: 1.3 !important;
    }

    /* Mobile-optimized member items */
    .member-item {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 10px !important;
        gap: 8px !important;
        border-radius: 8px !important;
    }

    .member-info-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 8px !important;
    }

    .member-name-section {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 !important;
    }

    .member-name {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
    }

    .member-ratio {
        background: #27ae60 !important;
        color: white !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
    }

    .member-actions {
        display: flex !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .member-actions .btn-edit,
    .member-actions .btn-danger {
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
        border-radius: 5px !important;
        min-width: 45px !important;
        height: 28px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Mobile button improvements */
    .btn {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
        border-radius: 6px !important;
        min-height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
    }

    .btn-primary, .btn-success {
        font-weight: 500 !important;
    }

    /* Form improvements */
    .add-member {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 15px !important;
    }

    .add-member input {
        width: 100% !important;
        padding: 8px 10px !important;
        font-size: 0.9rem !important;
        border: 1px solid #ddd !important;
        border-radius: 6px !important;
        box-sizing: border-box !important;
    }

    .add-member input:focus {
        border-color: #27ae60 !important;
        outline: none !important;
        box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.1) !important;
    }

    /* Header improvements */
    .logo {
        font-size: 1.8rem !important;
        margin-bottom: 6px !important;
    }

    .logo i {
        font-size: 1.6rem !important;
    }

    .subtitle {
        font-size: 0.9rem !important;
        color: #7f8c8d !important;
    }

    /* Modal improvements */
    .modal-content {
        margin: 8px !important;
        max-width: calc(100vw - 16px) !important;
        border-radius: 10px !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
    }

    .modal-header {
        padding: 12px !important;
        border-radius: 10px 10px 0 0 !important;
    }

    .modal-body .card {
        margin-bottom: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Group management improvements */
    .group-item {
        padding: 10px !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
    }

    .group-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
    }

    .group-content {
        margin-left: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    /* Expense list improvements */
    .expense-item {
        padding: 10px !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
    }

    .expense-header {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        align-items: flex-start !important;
    }

    .expense-title {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
    }

    .expense-amount {
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        color: #27ae60 !important;
    }

    /* Text size adjustments */
    .form-group label {
        font-size: 0.85rem !important;
        margin-bottom: 5px !important;
    }

    .form-group input,
    .form-group select {
        font-size: 0.9rem !important;
        padding: 8px 10px !important;
        border-radius: 6px !important;
    }

    /* Language dropdown mobile fix */
    .language-dropdown {
        right: 8px !important;
        left: 8px !important;
        width: auto !important;
        max-width: none !important;
    }
}

/* Extra small mobile devices */
@media screen and (max-width: 480px) {
    .container {
        padding: 6px !important;
    }

    .card {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }

    .card h2 {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
    }

    .logo {
        font-size: 1.6rem !important;
    }

    .btn {
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
        min-height: 32px !important;
    }

    .member-actions .btn-edit,
    .member-actions .btn-danger {
        padding: 4px 6px !important;
        font-size: 0.7rem !important;
        min-width: 40px !important;
        height: 24px !important;
    }

    .member-name {
        font-size: 0.85rem !important;
    }

    .member-ratio {
        font-size: 0.7rem !important;
        padding: 1px 4px !important;
    }

    .add-member input {
        padding: 6px 8px !important;
        font-size: 0.85rem !important;
    }

    .modal-content {
        margin: 4px !important;
        max-width: calc(100vw - 8px) !important;
    }
}

/* Landscape orientation improvements */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .container {
        padding: 6px !important;
    }

    .card {
        margin-bottom: 8px !important;
        padding: 8px !important;
    }

    .member-item {
        padding: 6px !important;
    }

    .modal-content {
        max-height: 80vh !important;
    }
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    /* Larger touch targets */
    .btn, button, input[type="button"], input[type="submit"] {
        min-height: 36px !important;
        touch-action: manipulation !important;
    }

    /* Better scrolling */
    .modal-content, .dropdown-menu {
        -webkit-overflow-scrolling: touch !important;
    }

    /* Prevent text selection issues */
    .member-item, .expense-item, .group-item {
        -webkit-user-select: none !important;
        user-select: none !important;
    }

    .member-item input, .expense-item input {
        -webkit-user-select: auto !important;
        user-select: auto !important;
    }

    /* Better focus states for mobile */
    input:focus, select:focus, textarea:focus {
        transform: none !important;
        outline: 2px solid #27ae60 !important;
        outline-offset: 1px !important;
    }
}

/* ========================================
   🎨 BEAUTIFUL LOGIN SCREEN DESIGN
   ======================================== */

/* Login Screen Background */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #f093fb 50%, 
        #f5576c 75%, 
        #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    /* Safe area support for mobile notches */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Background Shapes */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 20%;
    right: 15%;
    animation-delay: -5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 30%;
    left: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 25%;
    animation-delay: -15s;
}

.shape-5 {
    width: 40px;
    height: 40px;
    top: 50%;
    left: 5%;
    animation-delay: -7s;
}

.shape-6 {
    width: 90px;
    height: 90px;
    top: 70%;
    right: 10%;
    animation-delay: -12s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
        opacity: 1;
    }
    66% {
        transform: translateY(30px) rotate(240deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.7;
    }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    min-height: 100vh;
}

/* Hero Section */
.login-hero {
    padding: 40px;
    color: white;
}

.hero-content {
    max-width: 500px;
}

.app-logo-large {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    animation: slideInFromLeft 1s ease-out;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo-icon i {
    font-size: 2.5rem;
    color: #fff;
}

.app-name {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    margin-bottom: 40px;
    animation: slideInFromLeft 1s ease-out 0.2s both;
}

.tagline-main {
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #fff;
    line-height: 1.2;
}

.tagline-sub {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
    color: #f0f0f0;
}

/* Features Preview */
.features-preview {
    display: grid;
    gap: 20px;
    animation: slideInFromLeft 1s ease-out 0.4s both;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.feature-text h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.feature-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    color: #f0f0f0;
    line-height: 1.4;
}

/* Login Section */
.login-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: slideInFromRight 1s ease-out 0.3s both;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: pulse 2s infinite;
}

.login-icon i {
    font-size: 2rem;
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.card-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.login-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Google Sign-in Button */
.btn-google-signin {
    width: 100%;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-google-signin:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.2);
}

.btn-google-signin:active {
    transform: translateY(0);
}

.google-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login Benefits */
.login-benefits {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
}

.benefit-item i {
    color: #4caf50;
    font-size: 1rem;
}

/* App Stats */
.app-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Language Selector for Login */
.login-language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.language-toggle-login {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 10px 15px;
    color: white;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.language-toggle-login:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design for Login */
@media screen and (max-width: 768px) {
    .login-screen {
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden;
        align-items: flex-start;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    /* Hide some background shapes on mobile for better performance */
    .shape-5, .shape-6 {
        display: none;
    }
    
    .login-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
        min-height: 100vh;
        width: 100%;
        max-width: 100%;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .login-hero {
        padding: 15px;
        text-align: center;
        order: 2;
        margin-top: 0;
    }
    
    .login-section {
        order: 1;
        margin-top: 0;
    }
    
    .app-logo-large {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        margin-right: 12px;
    }
    
    .logo-icon i {
        font-size: 1.8rem;
    }
    
    .app-name {
        font-size: 1.8rem;
    }
    
    .tagline-main {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .tagline-sub {
        font-size: 0.9rem;
    }
    
    .features-preview {
        display: none;
    }
    
    .login-card {
        padding: 20px;
        margin-bottom: 15px;
        border-radius: 16px;
    }
    
    .card-header {
        margin-bottom: 20px;
    }
    
    .login-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .login-icon i {
        font-size: 1.5rem;
    }
    
    .card-header h3 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .btn-google-signin {
        padding: 14px 20px;
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .login-benefits {
        gap: 8px;
    }
    
    .benefit-item {
        font-size: 0.85rem;
    }
    
    .app-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px;
        border-radius: 16px;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .language-toggle-login {
        padding: 6px 10px;
        font-size: 0.75rem;
        top: 15px;
        right: 15px;
    }
}

@media screen and (max-width: 480px) {
    .login-screen {
        padding: 0;
    }
    
    .login-container {
        padding: 8px;
        gap: 12px;
        padding-top: 15px;
    }
    
    .login-hero {
        padding: 12px;
    }
    
    .app-logo-large {
        margin-bottom: 12px;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
        margin-right: 10px;
    }
    
    .logo-icon i {
        font-size: 1.6rem;
    }
    
    .app-name {
        font-size: 1.6rem;
    }
    
    .tagline-main {
        font-size: 1.1rem;
    }
    
    .tagline-sub {
        font-size: 0.8rem;
    }
    
    .login-card {
        padding: 18px;
        margin-bottom: 12px;
        border-radius: 14px;
    }
    
    .card-header {
        margin-bottom: 18px;
    }
    
    .login-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 12px;
    }
    
    .login-icon i {
        font-size: 1.3rem;
    }
    
    .card-header h3 {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .login-subtitle {
        font-size: 0.8rem;
    }
    
    .btn-google-signin {
        padding: 12px 18px;
        font-size: 0.95rem;
        margin-bottom: 18px;
    }
    
    .google-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .login-benefits {
        gap: 6px;
    }
    
    .benefit-item {
        font-size: 0.8rem;
    }
    
    .app-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px;
        border-radius: 14px;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
        line-height: 1.2;
    }
    
    .language-toggle-login {
        padding: 5px 8px;
        font-size: 0.7rem;
        top: 12px;
        right: 12px;
    }
}

/* Extra small devices (very small phones) */
@media screen and (max-width: 360px) {
    .login-container {
        padding: 6px;
        gap: 10px;
        padding-top: 12px;
    }
    
    .login-card {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .app-stats {
        gap: 8px;
        padding: 10px;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    .btn-google-signin {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .app-name {
        font-size: 1.4rem;
    }
    
    .tagline-main {
        font-size: 1rem;
    }
}

/* Landscape orientation on mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .login-container {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: center;
        min-height: auto;
        padding: 10px;
    }
    
    .login-hero {
        order: 1;
        padding: 15px;
    }
    
    .login-section {
        order: 2;
    }
    
    .features-preview {
        display: none;
    }
    
    .app-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 8px;
    }
    
    .stat-number {
        font-size: 0.9rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
}

/* ========================================
   🎨 LOGIN LANGUAGE MENU STYLING
   ======================================== */

.login-language-menu {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.login-lang-item {
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    background: white;
}

.login-lang-item:hover {
    background: #f0f0f0 !important;
    transform: translateX(4px);
}

.login-lang-item.selected {
    background: #e3f2fd !important;
    border: 2px solid #2196f3;
    font-weight: 600;
}

.login-lang-item:first-child {
    margin-top: 0;
}

.login-lang-item:last-child {
    margin-bottom: 0;
}

/* Alert container override for language menu */
.alert-container .alert.alert-info {
    background: white;
    border: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
}

.alert-container .alert.alert-info .alert-content {
    padding: 0;
}



