@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');


/* =========================
   GLOBAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: #f4f7fb;
    color: #1e293b;
}

a {
    text-decoration: none;
}


/* =========================
   NAVIGATION
========================= */

header {
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, .05);
    position: sticky;
    top: 0;
}

nav {
    width: 90%;
    max-width: 1200px;
    height: 80px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    color: #2563eb;
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a,
.footer-links a {
    color: #475569;
    transition: .3s;
}

.nav-links a:hover,
.footer-links a:hover {
    color: #2563eb;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.auth-buttons a {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: .3s;
}

.auth-buttons a:first-child {
    color: #2563eb;
    border: 2px solid #2563eb;
}

.auth-buttons a:last-child {
    background: #2563eb;
    color: white;
}

.auth-buttons a:hover {
    transform: translateY(-2px);
}


/* =========================
   HERO
========================= */

.hero {
    width: 90%;
    max-width: 1200px;
    min-height: 85vh;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-buttons a {
    padding: 14px 24px;
    border: 2px solid #1e40af;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    font-weight: 600;
    transition: .3s;
    box-shadow: 0 0 0 2px white;
}

.hero-buttons a:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-3px);
}

.hero-image {
    height: 450px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}


/* =========================
   FEATURES
========================= */

.features,
.demo-features {
    width: 90%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.features {
    margin: 80px auto;
}

.demo-features {
    margin: 40px auto 80px;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
    transition: .3s;
}

.feature-card:hover {
    transform: translateY(-8px);
}

.feature-card p {
    color: #64748b;
}


/* =========================
   CTA
========================= */

.cta {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 5rem;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 25px;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.cta-buttons a {
    padding: 14px 24px;
    border: 2px solid #1e40af;
    border-radius: 12px;
    background: white;
    color: #2563eb;
    font-weight: 600;
    transition: .3s;
}

.cta-buttons a:hover {
    background: #eff6ff;
    border-color: #1e40af;
    color: #1d4ed8;
    transform: translateY(-3px);
}


/* =========================
   FOOTER
========================= */

footer {
    width: 90%;
    max-width: 1200px;
    margin: 80px auto 30px;
    display: flex;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    gap: 2rem;
}


/* =========================
   AUTH
========================= */

.auth-page {
    min-height: calc(100vh - 80px);
    padding: 4rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
}

.auth-card h1 {
    text-align: center;
}

.auth-card > p {
    text-align: center;
    color: #64748b;
    margin: 1rem 0 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 600;
    margin-bottom: .5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.auth-card button,
.auth-card input[type="submit"] {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
}

.auth-card button:hover,
.auth-card input[type="submit"]:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.auth-links {
    margin-top: 2rem;
    text-align: center;
}

.auth-links p {
    margin: .4rem 0;
}

.auth-links a {
    color: #2563eb;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links p:last-child {
    color: #94a3b8;
    font-size: .9rem;
}

.auth-links p:last-child a {
    color: #64748b;
}

/* Authentication error messages */
.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin: 0.4rem 0 0;
    font-weight: 500;
}

.auth-card > .error-message {
    margin: 0 0 1.2rem;
    text-align: center;
}


/* =========================
   SUBSCRIPTIONS
========================= */

.subscription-card {
    width: 96%;
    max-width: 1600px;
    background: white;
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.subscription-header p {
    color: #64748b;
}

.add-button {
    background: #2563eb;
    color: white;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
}

.table-wrapper {
    overflow-x: auto;
}

.subscription-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.subscription-table th {
    text-align: left;
    padding: 10px 12px;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.subscription-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.subscription-table tr:hover {
    background: #f8fafc;
}


/* =========================
   SUBSCRIPTION STATUS
========================= */

.subscription-table td.status-cell {
    text-align: center;
    vertical-align: middle;
}

.status-active,
.status-inactive {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 60px;
    height: 28px;
    padding: 0 12px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}


/* =========================
   SUBSCRIPTION BUTTONS
========================= */

.edit-button,
.delete-button,
.view-button {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .85rem;
}

.view-button {
    background: #eff6ff;
    color: #2563eb;
}

.view-button:hover {
    opacity: .8;
}

.edit-button {
    background: #2563eb;
    color: white;
}

.edit-button:hover {
    background: #1d4ed8;
}

.delete-button {
    background: #fee2e2;
    color: #b91c1c;
}

.delete-button:hover {
    background: #fecaca;
}


/* =========================
   SUBSCRIPTION DETAILS
========================= */

.subscription-details-card {
    max-width: 500px;
    text-align: center;
}

.notes-box {
    min-height: 100px;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 15px;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-box p {
    word-break: break-word;
}

.back-button {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    transition: .3s;
}

.back-button:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}


/* =========================
   SUBSCRIPTION SUMMARY
========================= */

.subscription-summary {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-box {
    background: #f8fafc;
    border-radius: 20px;
    padding: 1.5rem;
    min-width: 220px;
}

.summary-box h3 {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: .5rem;
}

.summary-box p {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
}


/* =========================
   SUBSCRIPTION DETAILS ACTIONS
========================= */

.details-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.details-actions a {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: .3s;
}


/* =========================
   EDIT NOTE
========================= */

.edit-note-card {
    max-width: 550px;
}

.edit-note-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.edit-note-label {
    display: block;
    color: #64748b;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.edit-note-header h1 {
    color: #2563eb;
    font-size: 2rem;
    margin: 0;
}

.edit-note-card textarea {
    min-height: 140px;
    resize: vertical;
}


/* =========================
   DELETE SUBSCRIPTION
========================= */

.delete-card {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
}

.delete-card h1 {
    text-align: center;
    margin-bottom: .75rem;
}

.delete-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
}

.delete-details {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-radius: 15px;
}

.delete-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .9rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.delete-detail:last-child {
    border-bottom: none;
}

.delete-detail span {
    color: #64748b;
}

.delete-detail strong {
    color: #1e293b;
    text-align: right;
}

.delete-warning {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    color: #be123c;
    text-align: center;
}

.delete-actions {
    display: flex;
    gap: 1rem;
}

.cancel-button,
.confirm-delete-button {
    flex: 1;
    padding: 13px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    text-align: center;
    transition: .3s;
}

.cancel-button {
    background: #f1f5f9;
    color: #475569;
}

.cancel-button:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.confirm-delete-button {
    background: #dc2626;
    color: white;
    border: none;
}

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


/* =========================
   FLASH MESSAGES
========================= */

.flash-container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
}

.flash-message {
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
}

.flash-message.success {
    background: #dcfce7;
    color: #166534;
    border: 2px solid #22c55e;
}

.flash-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}


/* =========================
   HOW TO USE
========================= */

.how-to-use-card {
    max-width: 800px;
}

.help-section {
    margin-top: 2.5rem;
}

.help-section h2 {
    color: #1e293b;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid #e2e8f0;
}

.help-item {
    margin-bottom: 1.5rem;
}

.help-item h3 {
    font-size: 1rem;
    margin-bottom: .5rem;
    color: #1e293b;
}

.help-item p,
.help-example p {
    color: #64748b;
    line-height: 1.7;
}

.help-image {
    margin: 1.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}

.help-image img {
    display: block;
    width: 100%;
    height: auto;
}


/* =========================
   HOW TO USE - STEPS
========================= */

.help-intro {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: .3s;
}

.step-card:hover {
    border-color: #bfdbfe;
    transform: translateX(4px);
}

.step-number {
    min-width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
}

.step-content h3 {
    margin-bottom: .35rem;
    font-size: 1rem;
}

.step-content p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}


/* =========================
   HOW TO USE - EXAMPLES
========================= */

.help-example {
    margin-top: 2.5rem;
}

.help-example h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}


/* =========================
   DEMO
========================= */

.demo-hero {
    width: 90%;
    max-width: 1200px;
    min-height: 75vh;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.demo-content h1 {
    font-size: 3.2rem;
    line-height: 1.1;
    margin: 1rem 0 1.5rem;
}

.demo-content p {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.7;
    max-width: 550px;
    margin-bottom: 2rem;
}

.demo-label {
    color: #2563eb;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
}


/* =========================
   DEMO PREVIEW
========================= */

.demo-preview {
    background: white;
    border-radius: 25px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.preview-header h3 {
    margin-bottom: .3rem;
}

.preview-header p {
    color: #64748b;
    font-size: .9rem;
}

.preview-button {
    background: #2563eb;
    color: white;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: .85rem;
    font-weight: 600;
}

.preview-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.preview-summary div {
    background: #f4f7fb;
    padding: 1rem;
    border-radius: 12px;
}

.preview-summary span {
    display: block;
    color: #64748b;
    font-size: .85rem;
    margin-bottom: .4rem;
}

.preview-summary strong {
    font-size: 1.3rem;
}

.preview-list {
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.preview-item div {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.preview-item span {
    color: #64748b;
    font-size: .85rem;
}


/* =========================
   SPENDING PAGE
========================= */

main {
    min-height: 70vh;
}

.spending-hero {
    min-height: 430px;
    padding-top: 60px;
    padding-bottom: 60px;
}

.spending-hero .hero-content h1 {
    font-size: 3.2rem;
    margin-bottom: 1.2rem;
}

.spending-hero .hero-content p {
    max-width: 560px;
    line-height: 1.7;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    nav {
        flex-direction: column;
        height: auto;
        padding: 1.5rem;
        gap: 1rem;
    }

    .hero,
    .demo-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .features,
    .demo-features {
        grid-template-columns: 1fr;
    }

    .subscription-card {
        padding: 2rem 1rem;
    }

    .subscription-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .subscription-summary {
        flex-direction: column;
    }

    footer {
        flex-direction: column;
        gap: 1rem;
    }
}