/* Limonoto Panel - CSS */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --success-dark: #15803d;
    --danger: #dc2626;
    --danger-dark: #b91c1c;
    --warning: #d97706;
    --secondary: #6b7280;
    --light: #f3f4f6;
    --dark: #1f2937;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-box {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

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

.login-header h1 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.login-header p {
    color: var(--secondary);
    font-size: 0.875rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    padding: 0;
    cursor: pointer;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-text {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-top: 0.25rem;
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: transparent;
    border: 1px solid white;
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fffbeb;
    color: var(--warning);
    border: 1px solid #fde68a;
}

/* Panel Page */
.panel-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    font-size: 1.25rem;
}

.main {
    flex: 1;
    padding: 2rem 0;
}

.footer {
    background: var(--dark);
    color: var(--secondary);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    background: var(--light);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Status Info */
.status-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.status-item .label {
    color: var(--secondary);
    font-size: 0.875rem;
}

.status-item .value {
    font-weight: 500;
}

.status-item .link {
    color: var(--primary);
    text-decoration: none;
}

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

/* Text Colors */
.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

/* Price Ranges */
#priceRanges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--light);
    border-radius: var(--radius);
}

.range-row input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.875rem;
}

.range-row input:focus {
    outline: none;
    border-color: var(--primary);
}

.range-separator {
    color: var(--secondary);
    font-weight: 500;
}

.range-percent {
    color: var(--secondary);
    font-size: 0.875rem;
}

.remove-range {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    line-height: 1;
}

/* Info List */
.info-list {
    list-style: none;
}

.info-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.info-list li:last-child {
    border-bottom: none;
}

/* Utility Classes */
.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

/* Progress Bar */
.progress-container {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

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

.progress-title {
    font-weight: 600;
    color: var(--dark);
}

.progress-percent {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.progress-bar-wrapper {
    background: var(--light);
    border-radius: 999px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--secondary);
}

.progress-brand {
    font-weight: 500;
    color: var(--dark);
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-stats {
    text-align: right;
}

/* Checkbox Groups for Filters */
.checkbox-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    background: var(--light);
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    padding: 0.35rem 0.5rem;
    margin: 0;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkbox-group label:hover {
    background: white;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.filter-search {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.filter-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.filter-controls button {
    flex: 1;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-controls button:hover {
    background: var(--light);
    border-color: var(--primary);
}

.filter-count {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .range-row {
        flex-wrap: wrap;
    }

    .range-row input {
        width: calc(33% - 1rem);
    }

    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
}
