/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: 340 75% 65%;
    --secondary: 175 55% 75%;
    --accent: 47 90% 60%;
    --background: 0 0% 100%;
    --foreground: 340 10% 20%;
    --muted: 340 8% 46%;
    --muted-foreground: 340 8% 46%;
    --card: 0 0% 100%;
    --border: 340 15% 90%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: hsl(var(--background));
    min-height: 100vh;
    color: hsl(var(--foreground));
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 1rem;
    padding: 3rem 2rem;
    box-shadow: 0 8px 30px -4px hsl(340, 50%, 50%, 0.15);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .login-header h1 {
        font-size: 2rem;
        color: hsl(340, 75%, 65%);
        margin-bottom: 0.5rem;
    }

    .login-header p {
        color: hsl(340, 8%, 46%);
        font-size: 1rem;
    }

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .form-group label {
        font-weight: 500;
        font-size: 0.875rem;
        color: hsl(340, 10%, 20%);
    }

    .form-group input {
        padding: 0.75rem 1rem;
        border: 1px solid hsl(340, 15%, 90%);
        border-radius: 0.5rem;
        font-size: 1rem;
        transition: all 0.2s;
    }

        .form-group input:focus {
            outline: none;
            border-color: hsl(340, 75%, 65%);
            box-shadow: 0 0 0 3px hsl(340, 75%, 65%, 0.1);
        }

.btn-primary {
    background: hsl(340, 75%, 65%);
    color: white;
    padding: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-primary:hover {
        background: hsl(340, 75%, 60%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px hsl(340, 75%, 65%, 0.3);
    }

.btn-secondary {
    background: hsl(175, 55%, 75%);
    color: hsl(340, 10%, 20%);
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-secondary:hover {
        background: hsl(175, 55%, 70%);
    }

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.link {
    color: hsl(340, 75%, 65%);
    text-decoration: none;
    font-size: 0.875rem;
}

    .link:hover {
        text-decoration: underline;
    }

/* Dashboard Page */
.dashboard-page {
    min-height: 100vh;
    background: linear-gradient(to bottom right, hsl(var(--primary) / 0.05), hsl(var(--background)), hsl(var(--secondary) / 0.05));
}

.dashboard-header {
    border-bottom: 1px solid hsl(var(--border));
    background: hsl(var(--card) / 0.5);
    backdrop-filter: blur(8px);
    /*position: sticky;*/
    top: 0;
    z-index: 10;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.store-selector-wrapper {
    display: flex;
    align-items: center;
}

.store-select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    background: hsl(var(--card));
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
}

    .store-select:hover {
        border-color: hsl(var(--primary));
        background-color: hsl(var(--primary) / 0.05);
    }

    .store-select:focus {
        outline: none;
        border-color: hsl(var(--primary));
        box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
    }

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-subtitle {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-logout:hover {
        background: hsl(var(--accent) / 0.1);
    }

.btn-icon {
    width: 1rem;
    height: 1rem;
}

.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 2rem;*/
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    border-radius: 0.5rem;
    border: 1px solid;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.stat-card-primary {
    border-color: hsl(var(--primary) / 0.2);
    background: linear-gradient(to bottom right, hsl(var(--primary) / 0.05), hsl(var(--primary) / 0.1));
}

.stat-card-secondary {
    border-color: hsl(var(--secondary) / 0.2);
    background: linear-gradient(to bottom right, hsl(var(--secondary) / 0.05), hsl(var(--secondary) / 0.1));
}

.stat-card-accent {
    border-color: hsl(var(--accent) / 0.2);
    background: linear-gradient(to bottom right, hsl(var(--accent) / 0.05), hsl(var(--accent) / 0.1));
}

.stat-card-header {
    padding: 1.5rem 1.5rem 0;
}

.stat-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.stat-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.stat-card-primary .stat-icon {
    color: hsl(var(--primary));
}

.stat-card-secondary .stat-icon {
    color: hsl(var(--secondary));
}

.stat-card-accent .stat-icon {
    color: hsl(var(--accent));
}

.stat-card-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
}

.stat-card-content {
    padding: 1.5rem;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
}

.stat-value-primary {
    color: hsl(var(--primary));
}

.stat-value-secondary {
    color: hsl(var(--secondary));
}

.stat-value-accent {
    color: hsl(var(--accent));
}

.stat-card-text {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
}

/* Tabs */
.tabs-container {
    margin-top: 1.5rem;
}

.tabs-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 28rem;
    margin: 0 auto 1.5rem;
    background: hsl(var(--muted) / 0.1);
    border-radius: 0.375rem;
    padding: 0.25rem;
}

.tab-trigger {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: hsl(var(--muted-foreground));
}

    .tab-trigger:hover {
        color: hsl(var(--foreground));
    }

.tab-active {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content-active {
    display: block;
}

/* Content Card */
.content-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.content-card-header {
    padding: 1.5rem;
}

.content-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.content-card-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
}

.content-card-body {
    padding: 0 0.5rem 0.5rem;
}

/* Table */
.table-wrapper {
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table thead {
        background: hsl(var(--muted) / 0.1);
    }

    .data-table th {
        padding: 0.75rem 1rem;
        text-align: left;
        font-size: 0.875rem;
        font-weight: 600;
        color: hsl(var(--muted-foreground));
    }

    .data-table td {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        border-top: 1px solid hsl(var(--border));
    }

    .data-table tbody tr:hover {
        background: hsl(var(--muted) / 0.05);
    }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: hsl(var(--secondary) / 0.15);
    color: hsl(var(--secondary));
}

.badge-scheduled {
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
}

.badge-completed {
    background: hsl(var(--secondary) / 0.15);
    color: hsl(var(--secondary));
}

.badge-converted {
    background: hsl(341.09deg 34.55% 80.98% / 15%);
    color: hsl(338.37deg 55% 75%);
}


/* Modal Customizado */
.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(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

.modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    padding: 0.75rem;
}

.modal-icon-error {
    background: hsl(0, 70%, 95%);
    color: hsl(0, 70%, 50%);
}

.modal-icon-success {
    background: hsl(var(--secondary) / 0.15);
    color: hsl(var(--secondary));
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin: 0;
}

.modal-message {
    text-align: center;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.modal-content .btn-primary {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .welcome-section h2 {
        font-size: 1.5rem;
    }

    .stats-card {
        grid-template-columns: 1fr;
    }

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

    .store-selector-wrapper {
        width: 100%;
    }

    .store-select {
        width: 100%;
        min-width: 200px;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }
}
