/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Premium Color Palette */
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    /* Indigo 600 */
    --secondary-color: #ec4899;
    /* Pink 500 */
    --background-dark: #0f172a;
    /* Slate 900 */
    --surface-dark: #1e293b;
    /* Slate 800 */
    --surface-light: #ffffff;
    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #94a3b8;
    /* Slate 400 */
    --accent-glow: rgba(99, 102, 241, 0.3);

    /* Spacing & Borders */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

/* Mobile Container Simulator */
.app-container {
    width: 100%;
    max-width: 480px;
    /* Mobile width constraint */
    min-height: 100vh;
    background: linear-gradient(180deg, var(--background-dark) 0%, #1e1b4b 100%);
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* Header Section */
.header {
    padding: 24px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.back-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-bounce);
    font-size: 1.2rem;
    text-decoration: none;
}

.back-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.header-title {
    flex: 1;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-right: 44px;
    /* Balance the back button */
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Grid Layout */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 24px;
    padding-bottom: 40px;
}

/* Action Cards */
.card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    height: 140px;
}

.card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: 0.3s;
}

.card:active {
    transform: scale(0.96);
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(99, 102, 241, 0.3);
}

.card-icon {
    font-size: 2rem;
    padding: 12px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    transition: var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card:hover .card-icon {
    transform: translateY(-4px);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 20px -5px var(--primary-color);
}

.card-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    transition: 0.3s;
}

.card:hover .card-label {
    color: var(--text-primary);
}

/* Specific Card Themes (Optional customization per button type) */
.card.finance .card-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.card.finance:hover .card-icon {
    background: #10b981;
    color: white;
    box-shadow: 0 10px 20px -5px #10b981;
}

.card.store .card-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.card.store:hover .card-icon {
    background: #f59e0b;
    color: white;
    box-shadow: 0 10px 20px -5px #f59e0b;
}

.card.school .card-icon {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.card.school:hover .card-icon {
    background: #3b82f6;
    color: white;
    box-shadow: 0 10px 20px -5px #3b82f6;
}

.card.danger .card-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.card.danger:hover .card-icon {
    background: #ef4444;
    color: white;
    box-shadow: 0 10px 20px -5px #ef4444;
}

/* Animation Entrance */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideUp 0.5s ease-out backwards;
}

.card:nth-child(1) {
    animation-delay: 0.05s;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.15s;
}

.card:nth-child(4) {
    animation-delay: 0.2s;
}

.card:nth-child(5) {
    animation-delay: 0.25s;
}

.card:nth-child(6) {
    animation-delay: 0.3s;
}

.card:nth-child(7) {
    animation-delay: 0.35s;
}

.card:nth-child(8) {
    animation-delay: 0.4s;
}

.card:nth-child(9) {
    animation-delay: 0.45s;
}

.card:nth-child(10) {
    animation-delay: 0.5s;
}

/* Form Styles */
.form-container {
    padding: 24px;
    background: rgba(30, 41, 59, 0.4);
    margin: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.input-group {
    margin-bottom: 16px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.input-field {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: var(--transition-fast);
}

.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-field[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* List/Card Styles */
.list-container {
    padding: 0 16px 100px 16px;
    /* Bottom padding for fixed footer */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-fast);
    animation: slideUp 0.3s ease-out backwards;
}

.data-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.card-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

/* Footer Actions */
.footer-actions {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
    z-index: 200;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Custom Modal Styles */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85); /* Dark overlay with blur effect handled by backdrop-filter if desired, usually on modal itself or container */
    backdrop-filter: blur(4px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.custom-modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.custom-modal-text {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 8px;
}