@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #09090b;
    --glass-bg: rgba(24, 24, 27, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary: #0ea5e9;
    --success: #10b981;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --input-bg: rgba(0, 0, 0, 0.3);
    --input-focus: rgba(139, 92, 246, 0.1);
    --gradient-primary: linear-gradient(135deg, #8b5cf6, #0ea5e9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.08), transparent 25%);
}

.glow-bg::before,
.glow-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.glow-bg::before {
    width: 40vw;
    height: 40vw;
    background: var(--primary);
    top: -10%;
    left: -10%;
}

.glow-bg::after {
    width: 30vw;
    height: 30vw;
    background: var(--secondary);
    bottom: -10%;
    right: -5%;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}
.app-container {
    max-width: 1536px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
}

.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.logo h2 {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
    right: 2px;
    border: 2px solid var(--bg-dark);
}

.user-profile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    transition: transform 0.3s;
}

.user-profile:hover img {
    transform: scale(1.05);
    border-color: var(--primary);
}

.dashboard-grid {
    display: flex;
    gap: 24px;
    flex: 1;
    align-items: flex-start;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.form-panel {
    flex: 0 0 360px;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.panel-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header h3 i {
    color: var(--primary);
}

.panel-header .subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 6px;
}

.form-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-box {
    position: relative;
    border-radius: 10px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-box::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.input-box:focus-within::before {
    width: 100%;
}

.input-box:focus-within {
    background: var(--input-focus);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

.input-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.input-box:focus-within i {
    color: var(--primary);
}

.input-box input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 14px 12px 38px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
}

.input-box input[type="number"]::-webkit-outer-spin-button,
.input-box input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-box input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.price-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.total-badge {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.total-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.total-badge.active {
    transform: scale(1.02);
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(52, 211, 153, 0.15);
}

.total-badge.active::after {
    opacity: 0.1;
}

.total-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.total-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.total-spark {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.total-badge.active .total-spark {
    color: #34d399;
}

.total-value {
    font-size: 1.6rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.total-badge.active .total-value {
    color: #34d399;
    text-shadow: 0 0 15px rgba(52, 211, 153, 0.5);
}

.btn-gradient {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--gradient-primary);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

.btn-gradient span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
}

.btn-gradient:hover::before {
    opacity: 1;
}

.data-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.search-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.01);
}

.search-wrapper {
    flex: 1;
    position: relative;
    min-width: 200px;
}

.search-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.search-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 16px 12px 42px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-wrapper input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.search-wrapper input:focus+i {
    color: var(--secondary);
}

.search-filters {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.filter-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.delete-all-wrapper {
    padding: 0 24px;
}

.danger-btn {
    margin-top: 16px;
    padding: 10px 20px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.danger-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.table-container {
    padding: 16px 24px;
    overflow-x: auto;
}

.glass-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    white-space: nowrap;
}

.glass-table th {
    padding: 0 16px 12px;
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.glass-table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.glass-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.005);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.glass-table td {
    padding: 14px 16px;
    color: var(--text-main);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.glass-table td:first-child {
    border-left: 1px solid var(--glass-border);
    border-radius: 12px 0 0 12px;
}

.glass-table td:last-child {
    border-right: 1px solid var(--glass-border);
    border-radius: 0 12px 12px 0;
}

.glass-table .title-cell {
    font-weight: 600;
    color: white;
}

.glass-table .total-cell {
    font-weight: 700;
    color: #34d399;
}

.category-tag {
    padding: 4px 10px;
    background: rgba(14, 165, 233, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.05);
}

.icon-btn.edit {
    color: #38bdf8;
}

.icon-btn.edit:hover {
    background: #38bdf8;
    color: white;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
    transform: translateY(-3px) scale(1.05);
}

.icon-btn.del {
    color: #f87171;
}

.icon-btn.del:hover {
    background: #f87171;
    color: white;
    box-shadow: 0 0 15px rgba(248, 113, 113, 0.6);
    transform: translateY(-3px) scale(1.05);
}

@media (max-width: 1366px) {
    .app-container {
        padding: 16px;
    }

    .form-panel {
        flex: 0 0 300px;
    }
}

@media (max-width: 1024px) {
    .dashboard-grid {
        flex-direction: column;
    }

    .form-panel {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 12px;
        gap: 16px;
    }

    .glass-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }

    .logo h2 {
        font-size: 1.25rem;
    }

    .panel-header,
    .form-content,
    .search-header,
    .delete-all-wrapper,
    .table-container {
        padding: 16px;
    }

    .price-container {
        grid-template-columns: 1fr 1fr;
    }

    .row-grid {
        grid-template-columns: 1fr;
    }

    .search-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-filters {
        width: 100%;
        justify-content: space-between;
    }

    .filter-btn {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .total-badge {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .total-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .price-container {
        grid-template-columns: 1fr;
    }

    .input-box input {
        font-size: 0.95rem;
    }

    .glass-table th,
    .glass-table td {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
}