/* Main App Styles by Rio Ilham Hadi */
:root {
    --primary-color: #FF8383;
    --primary-hover: #ff6b6b;
    --primary-soft: rgba(255, 131, 131, 0.1);
}

.dashboard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.action-card {
    background: white;
    padding: 20px 10px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.dark .action-card {
    background: #333;
    border-color: rgba(255, 255, 255, 0.03);
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 131, 131, 0.1);
    border-color: var(--primary-color);
}

.action-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.action-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
}

.dark .action-label {
    color: #eee;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-card {
    background: white;
    padding: 30px;
    border-radius: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    min-height: 120px;
    display: flex;
    align-items: center;
}

.dark .task-card {
    background: #333;
    border-color: rgba(255, 255, 255, 0.03);
}

.task-title {
    font-weight: 600;
    color: #555;
}

.dark .task-title {
    color: #ccc;
}

/* Main App Layout */
.app-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
}

.dark .app-container {
    background: var(--bg-dark);
}

.app-navbar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: white;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .app-navbar {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nav-avatar:hover {
    transform: scale(1.05);
}

.app-content {
    flex: 1;
    padding: 20px 0px;
}

/* Profile Styles */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid var(--primary-color);
    object-fit: cover;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
}

.profile-email {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.settings-group {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
}

.dark .settings-group {
    background: #333;
    border-color: rgba(255, 255, 255, 0.03);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: background 0.2s ease;
}

.dark .settings-item {
    border-color: rgba(255, 255, 255, 0.03);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: rgba(0, 0, 0, 0.01);
}

.dark .settings-item:hover {
    background: rgba(255, 255, 255, 0.01);
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-item-label {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Bottom Navigation */
.app-bottom-nav {
    height: 70px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: sticky;
    bottom: 0;
    z-index: 50;
}

.dark .app-bottom-nav {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    transition: color 0.2s ease;
    flex: 1;
    padding: 10px 0;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item-icon {
    width: 24px;
    height: 24px;
}

.nav-item-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Center QR Button Enhancement */
.nav-item-qr-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    padding: 0;
    text-decoration: none !important;
    margin-top: -28px;
    position: relative;
    z-index: 60;
}

.nav-qr-button-outer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pulse animation for the button */
.nav-qr-button-outer::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #FF8383;
    opacity: 0.2;
    z-index: -1;
    animation: qr-pulse 2s infinite;
}

@keyframes qr-pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    70% {
        transform: scale(1.4);
        opacity: 0;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.nav-qr-button {
    width: 54px;
    height: 54px;
    border-radius: 20px;
    /* Squircle shape for more modern look */
    background: linear-gradient(135deg, #FF8383 0%, #ff5c5c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(255, 131, 131, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid white;
    position: relative;
    overflow: hidden;
}

.nav-qr-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    animation: qr-shimmer 3s infinite;
}

@keyframes qr-shimmer {
    0% {
        transform: rotate(45deg) translateX(-150%);
    }

    50%,
    100% {
        transform: rotate(45deg) translateX(150%);
    }
}

.dark .nav-qr-button {
    border-color: #2a2a2a;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.nav-qr-button.active {
    background: linear-gradient(135deg, #ff5c5c 0%, #f13d3d 100%);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(255, 131, 131, 0.5);
}

.nav-qr-button:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 15px 35px rgba(255, 131, 131, 0.5);
}

.nav-qr-button svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-item-label.active {
    color: #FF8383;
    font-weight: 900;
}

/* Image Upload Preview */
.image-upload-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.image-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.image-upload-wrapper:hover .upload-overlay {
    opacity: 1;
}

.hidden-input {
    display: none;
}

/* Enhanced Sign Out Button */
.sign-out-button {
    background: #fff0f0;
    color: #ff4d4d;
    border: 1px solid #ffcccc;
    font-weight: 700;
    transition: all 0.2s ease;
}

.dark .sign-out-button {
    background: #442222;
    color: #ff9999;
    border-color: #663333;
}

.sign-out-button:hover {
    background: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
}

@media (max-width: 600px) {
    .action-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .action-card {
        padding: 15px 5px;
    }

    .action-label {
        font-size: 0.75rem;
    }
}

/* Custom Confirm Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-container {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 32px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .modal-container {
    background: #333;
    border-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.modal-icon-wrapper {
    width: 64px;
    height: 64px;
    background: #FF8383/10;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FF8383;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.modal-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 32px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-button {
    flex: 1;
    height: 52px;
    border-radius: 18px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.modal-button-cancel {
    background: #f5f5f5;
    color: #666;
}

.dark .modal-button-cancel {
    background: #444;
    color: #bbb;
}

.modal-button-confirm {
    background: #FF8383;
    color: white;
    box-shadow: 0 8px 20px rgba(255, 131, 131, 0.25);
}

.modal-button-confirm:hover {
    background: #ff6b6b;
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Desktop Enhancements */
@media (min-width: 1024px) {
    .app-container {
        max-width: 1100px;
        border-left: 1px solid rgba(0, 0, 0, 0.05);
        border-right: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.03);
    }

    .dark .app-container {
        border-color: rgba(255, 255, 255, 0.05);
    }

    .dashboard-container {
        max-width: 1000px;
        padding: 40px;
    }

    .action-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 24px;
        margin-bottom: 40px;
    }

    .action-card {
        padding: 30px 20px;
        gap: 16px;
    }

    .action-icon-wrapper {
        width: 64px;
        height: 64px;
        border-radius: 20px;
    }

    .action-icon-wrapper svg {
        width: 32px;
        height: 32px;
    }

    .action-label {
        font-size: 1rem;
    }

    .app-navbar {
        height: 90px;
        padding: 0 40px;
    }

    .app-bottom-nav {
        height: 90px;
        padding: 0 40px;
        justify-content: center;
        gap: 60px;
    }

    .nav-item {
        flex: none;
        min-width: 80px;
    }

    .nav-item-icon {
        width: 28px;
        height: 28px;
    }

    .nav-item-label {
        font-size: 0.8rem;
        margin-top: 4px;
    }

    .nav-qr-button {
        width: 72px;
        height: 72px;
        border-radius: 24px;
        border-width: 4px;
    }

    .nav-qr-button-outer::after {
        width: 80px;
        height: 80px;
    }

    .nav-item-qr-center {
        margin-top: -36px;
        flex: none;
        margin-left: 20px;
        margin-right: 20px;
    }

    .task-card {
        padding: 40px;
        border-radius: 30px;
        min-height: 140px;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 30px;
    }

    .profile-avatar-large {
        width: 140px;
        height: 140px;
    }

    .profile-name {
        font-size: 1.6rem;
    }

    .settings-item {
        padding: 24px 30px;
    }

    .settings-item-icon {
        width: 48px;
        height: 48px;
    }

    .settings-item-icon svg {
        width: 24px;
        height: 24px;
    }

    .settings-item-label {
        font-size: 1.1rem;
    }
}