:root {
    --primary: #064e3b;
    --primary-light: #065f46;
    --accent: #d4af37;
    --accent-light: #fde68a;
    --bg-light: #f0fdf4;
    --text-dark: #022c22;
    --text-muted: #6b7280;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow: 0 10px 30px -5px rgba(6, 78, 59, 0.15);
    --sidebar-width: 280px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(6, 78, 59, 0.1);
    position: fixed;
    height: 100vh;
}

.logo-container {
    margin-bottom: 3rem;
    text-align: center;
}

.logo {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item:hover {
    background: rgba(6, 78, 59, 0.05);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(6, 78, 59, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
}

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

.badge {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-profile span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Dashboard Grid */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.metric-card {
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid white;
    background: var(--glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
}

.metric-card .value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Main Sections */
.main-sections {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.product-cycle-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow);
    min-height: 500px;
}

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

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.cycle-filter {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    font-family: inherit;
}

.cycle-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.cycle-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-align: center;
}

.cycle-col:nth-child(1) h4 { background: #d1fae5; color: #065f46; }
.cycle-col:nth-child(2) h4 { background: #fef3c7; color: #92400e; }
.cycle-col:nth-child(3) h4 { background: #fee2e2; color: #991b1b; }

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

.cycle-item {
    background: white;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(6, 78, 59, 0.05);
}

.cycle-item img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.item-info h5 { font-weight: 600; font-size: 0.95rem; }
.item-info span { font-size: 0.75rem; color: var(--text-muted); }

/* Side Panels */
.side-panels {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.panel {
    background: var(--glass);
    padding: 1.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.panel h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-align: center;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.list-placeholder {
    height: 200px;
    background: rgba(6, 78, 59, 0.02);
    border: 2px dashed rgba(6, 78, 59, 0.1);
    border-radius: 16px;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.2);
}

.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    width: 100%;
    margin-top: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 15px rgba(6, 78, 59, 0.3);
}

/* Modals */
.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);
}

.modal-content {
    background: white;
    margin: 2vh auto;
    padding: 2.5rem;
    border-radius: 24px;
    width: 500px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

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

.modal-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

input, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Installment Section */
.installment-section {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 16px;
    margin-top: 1rem;
    border: 1px dashed var(--primary);
}

.installment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.installment-info {
    display: flex;
    flex-direction: column;
}

.inst-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.inst-value {
    font-weight: 700;
    color: var(--primary);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.checkbox-wrapper input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
