/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores Structa */
    --primary-color: #1F3B4D;
    --primary-dark: #1a2f3d;
    --secondary-color: #C9A56D;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #1F3B4D;
    --darker-bg: #1a2f3d;
    --light-bg: #F6F7F8;
    --border-color: #e5e7eb;
    --text-primary: #2A2A2A;
    --text-secondary: #6b7280;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Cores adicionais Structa */
    --gold-structa: #C9A56D;
    --blue-structa: #1F3B4D;
    --blue-light-structa: #365C73;
    --white-ice: #F6F7F8;
    --gray-graphite: #2A2A2A;
}

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

/* Página de Login */
.login-page {
    background: linear-gradient(135deg, var(--blue-structa) 0%, var(--blue-light-structa) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header i {
    font-size: 50px;
    color: var(--gold-structa);
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: 2px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-section h2 {
    margin-bottom: 25px;
    color: var(--text-primary);
    font-size: 22px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-group label i {
    margin-right: 5px;
    color: var(--gold-structa);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
    justify-content: center;
}

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

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

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

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

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.switch-form {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.switch-form a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.switch-form a:hover {
    text-decoration: underline;
}

.message-box {
    margin-top: 20px;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.message-box.show {
    display: block;
}

.message-box.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.message-box.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Dashboard */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--dark-bg);
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
    background: var(--blue-structa) !important;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--gold-structa);
}

.sidebar-header i {
    font-size: 32px;
    color: var(--gold-structa);
}

.sidebar-header h1 {
    font-size: 18px;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: 2px;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 8px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(201, 165, 109, 0.2);
    color: white;
}

.nav-menu a i {
    font-size: 18px;
    width: 24px;
}

.user-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 10px;
}

.logout-btn {
    width: 100%;
    background: var(--danger-color);
    color: white;
    justify-content: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    background: var(--light-bg);
}

.content-header {
    margin-bottom: 30px;
}

.content-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
    font-weight: 500;
}

.content-header p {
    color: var(--text-secondary);
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.primary {
    background: var(--blue-structa);
}

.stat-icon.success {
    background: var(--success-color);
}

.stat-icon.warning {
    background: var(--gold-structa);
}

.stat-icon.danger {
    background: var(--danger-color);
}

.stat-details h3 {
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.stat-details p {
    color: var(--text-secondary);
    font-size: 14px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.card-header h3 {
    font-size: 20px;
    color: var(--text-primary);
}

/* Tabelas */
.table-container {
    overflow-x: auto;
}

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

thead {
    background: var(--light-bg);
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

tbody tr:hover {
    background: var(--light-bg);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.success {
    background: #d1fae5;
    color: #065f46;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge.info {
    background: #dbeafe;
    color: #1e40af;
}

/* Calendário */
.calendar-container {
    margin-top: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 10px;
}

.calendar-day {
    aspect-ratio: 1;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 80px;
    position: relative;
}

.calendar-day:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.calendar-posts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-post-item {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    margin-top: 2px;
}

.calendar-post-item.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.calendar-post-item.tiktok {
    background: #000000;
}

.calendar-post-item.youtube {
    background: #ff0000;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 22px;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
}

.close-modal:hover {
    color: var(--danger-color);
}

/* Grid de formulário */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Responsivo */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 15px 10px;
    }

    .sidebar-header h1,
    .nav-menu span,
    .user-info {
        display: none;
    }

    .sidebar-header {
        justify-content: center;
    }

    .nav-menu a {
        justify-content: center;
        padding: 12px;
    }

    .main-content {
        margin-left: 70px;
        padding: 20px;
    }

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

    .calendar-grid {
        gap: 5px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 5px;
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Logo Structa */
.logo-structa {
    width: 100%;
    max-width: 200px;
    height: auto;
}

.sidebar .logo-structa {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* Tipografia Structa */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
}

.card-header h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
}

/* Elementos dourados */
.gold-accent {
    color: var(--gold-structa);
}

.gold-bg {
    background-color: var(--gold-structa);
}

/* Botões com identidade Structa */
.btn-structa {
    background: var(--gold-structa);
    color: var(--blue-structa);
    font-weight: 600;
}

.btn-structa:hover {
    background: #b89557;
    color: var(--blue-structa);
}

/* Destaques */
.highlight-structa {
    border-left: 4px solid var(--gold-structa);
    padding-left: 15px;
}

/* Cards especiais */
.card-premium {
    border: 2px solid var(--gold-structa);
    position: relative;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-structa) 0%, var(--blue-structa) 100%);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Action buttons in tables */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-icon:hover {
    transform: scale(1.1);
}
