/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2196F3;
    --success-green: #4CAF50;
    --warning-yellow: #FFC107;
    --danger-red: #F44336;
    --accent-purple: #9C27B0;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border-light: #e0e0e0;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.header__title {
    font-size: 1.5rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.header__nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-btn:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

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

/* Main Content */
.main {
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

.section {
    display: none;
}

.section--active {
    display: block;
}

/* Dashboard */
.dashboard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard__header h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card__icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
}

.stat-card__content {
    display: flex;
    flex-direction: column;
}

.stat-card__number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.stat-card__label {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.project-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.project-card__image {
    width: 100%;
    height: 150px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}

.project-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card__content {
    padding: 1rem;
}

.project-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.project-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.project-card__type {
    background: var(--primary-blue);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.project-card__objective {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card__progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: var(--success-green);
    transition: var(--transition);
}

.project-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.project-card__deadline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-card__deadline--urgent {
    color: var(--danger-red);
}

/* Project Filters */
.projects__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.projects__filters {
    display: flex;
    gap: 1rem;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    background: var(--bg-white);
    color: var(--text-dark);
}

/* References */
.references__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.references__filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.reference-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
}

.reference-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.reference-card__image {
    width: 100%;
    height: 120px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

.reference-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reference-card__content {
    padding: 1rem;
}

.reference-card__title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.reference-card__type {
    display: inline-block;
    background: var(--accent-purple);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.reference-card__project {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.reference-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.reference-tag {
    background: var(--bg-light);
    color: var(--text-light);
    padding: 0.125rem 0.375rem;
    border-radius: 8px;
    font-size: 0.75rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn--primary:hover {
    background: #1976D2;
}

.btn--secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn--secondary:hover {
    background: #e0e0e0;
}

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

.btn--danger:hover {
    background: #d32f2f;
}

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

.btn--success:hover {
    background: #388E3C;
}

.btn--small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal--active {
    display: flex;
}

.modal__content {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal--large .modal__content {
    max-width: 800px;
}

.modal__header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal__header h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
}

.modal__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.25rem;
}

.modal__close:hover {
    color: var(--text-dark);
}

/* Forms */
.form {
    padding: 1.5rem;
}

.form__group {
    margin-bottom: 1rem;
}

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

.form__input,
.form__select,
.form__textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.form__textarea {
    resize: vertical;
    min-height: 80px;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form__actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* Image Preview */
.image-preview {
    margin-top: 0.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    max-width: 200px;
}

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

/* Project Detail */
.project-detail {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding: 1.5rem;
}

.project-info {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.project-info__image {
    width: 100%;
    height: 150px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

.project-info__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.project-info__item {
    margin-bottom: 0.75rem;
}

.project-info__label {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.25rem;
}

.project-info__value {
    color: var(--text-light);
}

/* Stages */
.stages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stages-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stage-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 1rem;
    transition: var(--transition);
}

.stage-item:hover {
    box-shadow: var(--shadow-light);
}

.stage-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.stage-item__title {
    font-weight: 600;
    color: var(--text-dark);
}

.stage-item__status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.stage-item__status--pendente {
    background: #fff3cd;
    color: #856404;
}

.stage-item__status--andamento {
    background: #d1ecf1;
    color: #0c5460;
}

.stage-item__status--concluido {
    background: #d4edda;
    color: #155724;
}

.stage-item__description {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stage-item__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stage-item__actions {
    display: flex;
    gap: 0.5rem;
}

.stage-item__btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.stage-item__btn:hover {
    background: var(--bg-light);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-green);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    display: none;
    align-items: center;
    gap: 1rem;
    z-index: 1100;
    max-width: 400px;
}

.notification--error {
    background: var(--danger-red);
}

.notification--warning {
    background: var(--warning-yellow);
    color: var(--text-dark);
}

.notification--active {
    display: flex;
}

.notification__close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
}

/* Footer */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 1rem 0;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.mb-1 {
    margin-bottom: 1rem;
}

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

.hidden {
    display: none !important;
}

/* Category Colors */
.category--diy {
    background: var(--warning-yellow);
    color: var(--text-dark);
}

.category--escrita {
    background: var(--accent-purple);
    color: white;
}

.category--costura {
    background: var(--success-green);
    color: white;
}

.category--pintura {
    background: var(--danger-red);
    color: white;
}

.category--artesanato {
    background: var(--primary-blue);
    color: white;
}

.category--design {
    background: #FF5722;
    color: white;
}

.category--outro {
    background: var(--text-light);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 15px;
    }
    
    .header__nav {
        width: 100%;
        justify-content: center;
    }
    
    .nav-btn {
        flex: 1;
        text-align: center;
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem;
    }
    
    .dashboard__header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .projects__header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .projects__filters {
        flex-direction: column;
    }
    
    .references__header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .references__filters {
        flex-direction: column;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .references-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .form__row {
        grid-template-columns: 1fr;
    }
    
    .form__actions {
        flex-direction: column;
    }
    
    .project-detail {
        grid-template-columns: 1fr;
    }
    
    .modal__content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal__header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .modal__actions {
        justify-content: center;
    }
    
    .stage-item__header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .stage-item__meta {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 1rem 0;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card__icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .project-card__content {
        padding: 0.75rem;
    }
    
    .reference-card__content {
        padding: 0.75rem;
    }
    
    .form {
        padding: 1rem;
    }
    
    .project-detail {
        padding: 1rem;
    }
}
