/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
    --white: #FFFFFF;
    --ivory: #FFFFF0;
    --beige: #F5F5DC;
    --gold: #D4AF37;
    --gold-light: #F3E5AB;
    --gold-dark: #AA8C2C;
    --black-soft: #2C2C2C;
    --green-subtle: #E8F5E9;
    --green-dark: #2E7D32;
    --red-subtle: #FFEBEE;
    --red-dark: #C62828;
    --orange-subtle: #FFF3E0;
    --orange-dark: #EF6C00;
    --blue-subtle: #E3F2FD;
    --blue-dark: #1565C0;
    
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--ivory);
    color: var(--black-soft);
    line-height: 1.6;
}

/* Header */
.header {
    background-color: var(--white);
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 2px solid var(--gold-light);
    box-shadow: var(--shadow);
}
.header-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--gold-dark);
    margin-bottom: 0.5rem;
}
.header-subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--black-soft);
    opacity: 0.7;
}

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

/* Dashboard Stats */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}
.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--gold);
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.stat-card h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 0.5rem;
}
.stat-card .value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--black-soft);
    font-family: var(--font-serif);
}

/* Progress Bar */
.progress-container {
    background: var(--beige);
    border-radius: 20px;
    height: 10px;
    width: 100%;
    margin-top: 1rem;
    overflow: hidden;
}
.progress-bar {
    background: var(--gold);
    height: 100%;
    transition: width 0.5s ease;
}

/* Tabs / Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}
.filter-btn {
    background: var(--white);
    border: 1px solid var(--gold-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    transition: all 0.2s;
    color: var(--black-soft);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

/* Tasks Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media(min-width: 768px) {
    .tasks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media(min-width: 1024px) {
    .tasks-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.task-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--gold);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s;
}
.task-card:hover {
    box-shadow: var(--shadow-hover);
}
.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.task-cat {
    font-size: 0.75rem;
    text-transform: uppercase;
    background: var(--beige);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    color: var(--black-soft);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.task-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0.5rem 0;
    line-height: 1.2;
}

/* States */
.state-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
}
.state-ORGANIZADO { background: var(--green-subtle); color: var(--green-dark); }
.state-PENDIENTE { background: var(--gold-light); color: var(--gold-dark); }
.state-EN_PROCESO { background: var(--blue-subtle); color: var(--blue-dark); }
.state-POR_CONFIRMAR { background: var(--orange-subtle); color: var(--orange-dark); }
.state-CANCELADO { background: var(--red-subtle); color: var(--red-dark); }

/* Task Actions */
.task-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.task-actions select {
    padding: 0.4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    width: 100%;
    cursor: pointer;
}

/* Quick switches */
.checkbox-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Section Titles */
.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--gold-dark);
    margin: 3rem 0 1.5rem;
    text-align: center;
}

/* Buttons */
.btn-primary {
    background: var(--gold);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-sans);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: opacity 0.2s;
}
.btn-primary:hover {
    opacity: 0.9;
}
/* TABS */
.tabs-nav { margin-bottom: 2rem; display: flex; gap: 1rem; border-bottom: 2px solid var(--gold-light); padding-bottom: 0.5rem; overflow-x: auto; }
.tab-btn { background: none; border: none; font-family: var(--font-serif); font-size: 1.1rem; color: var(--black-soft); cursor: pointer; padding: 0.5rem 1rem; border-radius: var(--radius) var(--radius) 0 0; transition: all 0.2s; white-space: nowrap; }
.tab-btn:hover { color: var(--gold-dark); background: var(--gold-light); }
.tab-btn.active { color: var(--gold-dark); border-bottom: 3px solid var(--gold-dark); font-weight: bold; }

/* MODALS */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.modal-content { background-color: var(--white); margin: auto; padding: 2rem; border: 1px solid var(--gold-light); width: 90%; max-width: 600px; border-radius: var(--radius); box-shadow: var(--shadow); position: relative; max-height: 90vh; overflow-y: auto; }
.close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; position: absolute; right: 1.5rem; top: 1rem; }
.close:hover { color: var(--red-dark); }
.input-form { padding: 0.8rem; font-size: 0.95rem; border: 1px solid #ccc; border-radius: var(--radius); font-family: var(--font-sans); box-sizing: border-box; width: 100%; }

/* TABLES */
.crud-table { width: 100%; border-collapse: collapse; background: var(--white); box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; font-size: 0.9rem; }
.crud-table th, .crud-table td { padding: 1rem; text-align: left; border-bottom: 1px solid #eee; }
.crud-table th { background: var(--ivory); color: var(--gold-dark); font-family: var(--font-serif); font-weight: bold; }
.crud-table tr:hover { background: #fafafa; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; border: 1px solid #ddd; background: #eee; cursor: pointer; border-radius: 4px; }
.btn-sm:hover { background: #ddd; }
/* SIDEBAR & HAMBURGER */
.hamburger-btn { background: none; border: none; font-size: 2rem; color: var(--gold-dark); cursor: pointer; padding: 0.5rem; transition: transform 0.2s; }
.hamburger-btn:hover { transform: scale(1.1); }
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; }
.sidebar { position: fixed; top: 0; left: -300px; width: 300px; height: 100%; background: var(--ivory); box-shadow: 2px 0 10px rgba(0,0,0,0.2); z-index: 2001; transition: left 0.3s ease; overflow-y: auto; }
.sidebar.open { left: 0; }
.sidebar-header { padding: 1.5rem; border-bottom: 2px solid var(--gold-light); display: flex; justify-content: space-between; align-items: center; }
.close-sidebar { font-size: 2rem; color: var(--gold-dark); cursor: pointer; }
.sidebar-menu { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-title { font-family: var(--font-serif); font-weight: bold; color: var(--black-soft); margin-bottom: 0.5rem; font-size: 0.9rem; letter-spacing: 1px; }
.sidebar-item { background: none; border: none; text-align: left; padding: 0.8rem; font-size: 1rem; color: var(--black-soft); cursor: pointer; border-radius: var(--radius); transition: background 0.2s, color 0.2s; font-family: var(--font-sans); }
.sidebar-item:hover { background: var(--white); color: var(--gold-dark); }
.sidebar-item.active { background: var(--gold-dark); color: var(--white); font-weight: bold; }

/* QUICK FILTERS */
.quick-filter-btn { background: none; border: 2px solid var(--gold-light); color: var(--black-soft); font-family: var(--font-serif); font-weight: bold; padding: 0.5rem 1rem; cursor: pointer; border-radius: 4px; transition: all 0.2s; }
.quick-filter-btn:hover { border-color: var(--gold-dark); color: var(--gold-dark); }
.quick-filter-btn.active { background: var(--gold-dark); color: var(--white); border-color: var(--gold-dark); }
