/* HORARIUM - Design Neon Suave e Moderno */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-principal: #111113;
    --destaque: #FFD580;
    --texto-secundario: #9CA3AF;
    --card: #F5F5F5;
    --btn-primary: #7FDEFF;
    --hover: #B388EB;
    --texto-principal: #FFFFFF;
    --card-dark: #1A1A1D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-principal);
    color: var(--texto-principal);
    line-height: 1.6;
}

/* Glow Effects */
.glow-text {
    color: var(--btn-primary);
    text-shadow: 0 0 8px rgba(127, 222, 255, 0.5);
}

.glow-gold {
    color: var(--destaque);
    text-shadow: 0 0 10px rgba(255, 213, 128, 0.4);
}

.btn-glow {
    background-color: var(--btn-primary);
    color: var(--bg-principal);
    box-shadow: 0 0 12px rgba(127, 222, 255, 0.35);
    border: none;
    transition: all 0.3s ease;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-glow:hover {
    box-shadow: 0 0 20px var(--btn-primary);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--hover);
    color: white;
    box-shadow: 0 0 12px rgba(179, 136, 235, 0.35);
    border: none;
    transition: all 0.3s ease;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-secondary:hover {
    box-shadow: 0 0 20px var(--hover);
    transform: translateY(-2px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login e Cadastro */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #111113 0%, #1A1A1D 100%);
}

.auth-box {
    background: var(--card-dark);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    border: 1px solid rgba(127, 222, 255, 0.1);
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--texto-secundario);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-principal);
    border: 1px solid rgba(127, 222, 255, 0.2);
    border-radius: 8px;
    color: var(--texto-principal);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--btn-primary);
    box-shadow: 0 0 0 3px rgba(127, 222, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.text-center {
    text-align: center;
    margin-top: 20px;
}

.text-center a {
    color: var(--btn-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.text-center a:hover {
    color: var(--destaque);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--card-dark);
    border-right: 1px solid rgba(127, 222, 255, 0.1);
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 40px;
}

.sidebar-logo h2 {
    font-size: 1.8rem;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--texto-secundario);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(127, 222, 255, 0.1);
    color: var(--btn-primary);
}

.sidebar-menu a svg {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(127, 222, 255, 0.1);
}

.header h1 {
    font-size: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Cards */
.card {
    background: var(--card-dark);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(127, 222, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card h3 {
    margin-bottom: 16px;
    color: var(--destaque);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--card-dark) 0%, #1f1f23 100%);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(127, 222, 255, 0.15);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(127, 222, 255, 0.2);
}

.stat-card h4 {
    color: var(--texto-secundario);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--btn-primary);
}

/* Tabelas */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: rgba(127, 222, 255, 0.05);
    padding: 12px 16px;
    text-align: left;
    color: var(--btn-primary);
    font-weight: 600;
    border-bottom: 2px solid rgba(127, 222, 255, 0.2);
    white-space: nowrap;
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(127, 222, 255, 0.1);
}

table tr:hover {
    background: rgba(127, 222, 255, 0.03);
}

/* Table Container for Scroll */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Botões de ação */
.btn-icon {
    background: none;
    border: none;
    color: var(--texto-secundario);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(127, 222, 255, 0.1);
    color: var(--btn-primary);
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Upgrade Page */
.upgrade-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upgrade-box {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.upgrade-box h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.upgrade-box p {
    font-size: 1.1rem;
    color: var(--texto-secundario);
    margin-bottom: 50px;
}

.plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.plan-card {
    background: var(--card-dark);
    border-radius: 16px;
    padding: 40px 30px;
    border: 2px solid rgba(127, 222, 255, 0.2);
    transition: all 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-8px);
    border-color: var(--btn-primary);
    box-shadow: 0 12px 32px rgba(127, 222, 255, 0.3);
}

.plan-card h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--destaque);
    margin-bottom: 10px;
}

.plan-price span {
    font-size: 1.2rem;
    color: var(--texto-secundario);
}

.plan-features {
    list-style: none;
    margin: 30px 0;
    text-align: left;
}

.plan-features li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(127, 222, 255, 0.1);
    color: var(--texto-secundario);
}

/* Agenda Pública */
.public-agenda {
    background: linear-gradient(135deg, #111113 0%, #1A1A1D 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.public-header {
    text-align: center;
    margin-bottom: 50px;
}

.public-logo img {
    max-width: 150px;
    margin-bottom: 20px;
    border-radius: 12px;
}

.professional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.professional-card {
    background: var(--card-dark);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(127, 222, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.professional-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(127, 222, 255, 0.2);
}

.professional-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid var(--btn-primary);
}

.professional-card h3 {
    margin-bottom: 6px;
}

.professional-card .cargo {
    color: var(--texto-secundario);
    font-size: 0.9rem;
}

/* Modal */
.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.8);
}

.modal-content {
    background-color: var(--card-dark);
    margin: 5% auto;
    padding: 30px;
    border: 1px solid rgba(127, 222, 255, 0.2);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
}

.close {
    color: var(--texto-secundario);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--btn-primary);
}

/* Responsivo - Mobile First Approach */

/* Mobile Extra Small (< 375px) */
@media (max-width: 374px) {
    body {
        font-size: 14px;
    }
    
    .auth-box {
        padding: 20px;
    }
    
    .card {
        padding: 15px;
    }
    
    .btn-glow, .btn-secondary {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    table {
        font-size: 0.75rem;
    }
    
    table th, table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
}

/* Mobile Small (375px - 479px) */
@media (max-width: 479px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-box {
        padding: 25px;
        max-width: 100%;
    }
    
    .auth-box h1 {
        font-size: 1.5rem;
    }
    
    .sidebar-logo h2 {
        font-size: 1.5rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .plan-card {
        padding: 25px 20px;
    }
    
    .plan-price {
        font-size: 2rem;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    table th, table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    /* Melhorar legibilidade de badges */
    .badge {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}

/* Mobile Medium (480px - 767px) */
@media (max-width: 767px) {
    /* Sidebar Mobile */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.show-mobile {
        left: 0;
    }
    
    /* Menu Toggle Button */
    .menu-toggle {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: var(--btn-primary);
        color: var(--bg-principal);
        border: none;
        padding: 12px 15px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.3rem;
        box-shadow: 0 4px 12px rgba(127, 222, 255, 0.3);
        display: block;
    }
    
    .menu-toggle:active {
        transform: scale(0.95);
    }
    
    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* Main Content */
    .main-content {
        margin-left: 0;
        padding: 80px 15px 20px 15px; /* Aumentado top padding para 80px */
        width: 100%;
    }
    
    .dashboard {
        flex-direction: column;
    }
    
    /* Header */
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-bottom: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .user-info {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Cards */
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
        font-size: 0.9rem;
        display: table;
    }
    
    table th, table td {
        padding: 10px 12px;
        white-space: nowrap;
        font-size: 0.85rem;
    }
    
    /* Ajustar largura das colunas em mobile */
    table th {
        font-size: 0.8rem;
        padding: 10px 8px;
    }
    
    table td {
        padding: 10px 8px;
    }
    
    /* Tornar texto de tabela mais visível */
    table {
        background: var(--card-dark);
        border-radius: 8px;
        overflow: hidden;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 18px;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-group button,
    .btn-group a {
        width: 100%;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 25px;
    }
    
    /* Upgrade Page */
    .upgrade-box h1 {
        font-size: 2rem;
    }
    
    .plans-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .plan-card {
        padding: 30px 25px;
    }
    
    /* Public Agenda */
    .public-header h1 {
        font-size: 1.8rem;
    }
    
    .professional-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .professional-card {
        padding: 15px;
    }
    
    /* Stats */
    .stat-card {
        padding: 20px;
    }
    
    /* Badges */
    .badge {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
}

/* Utilities */
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.text-muted { color: var(--texto-secundario); }
.text-small { font-size: 0.9rem; }

/* Tablet Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
        padding: 25px;
    }
    
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .professional-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .plans-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    table {
        font-size: 0.95rem;
    }
}

/* Tablet Landscape / Small Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
        padding: 30px;
    }
    
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .professional-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .plans-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .container {
        max-width: 1140px;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
    
    .professional-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
    
    .main-content {
        padding: 40px;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .professional-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .auth-box {
        max-width: 500px;
    }
}

/* Extra Large Desktop (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-left: 280px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .menu-toggle,
    .btn-glow,
    .btn-secondary,
    .alert {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    
    .card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .sidebar {
        padding: 15px 20px;
    }
    
    .sidebar-logo {
        margin-bottom: 20px;
    }
    
    .sidebar-menu li {
        margin-bottom: 5px;
    }
    
    .sidebar-menu a {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .glow-text,
    .btn-glow {
        text-shadow: 0 0 6px rgba(127, 222, 255, 0.6);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .sidebar,
    .modal,
    .btn-glow,
    .stat-card {
        transition: none !important;
    }
}

/* Dark Mode Support (if user prefers) */
@media (prefers-color-scheme: dark) {
    /* O sistema já é dark por padrão, mas podemos ajustar */
    body {
        background-color: var(--bg-principal);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Aumentar áreas clicáveis para touch */
    .btn-glow,
    .btn-secondary,
    .btn-icon {
        min-height: 44px;
        min-width: 44px;
    }
    
    .sidebar-menu a {
        padding: 14px 16px;
    }
    
    table td,
    table th {
        padding: 12px 10px;
    }
    
    /* Remover hover effects em touch devices */
    .btn-glow:hover,
    .btn-secondary:hover,
    .stat-card:hover,
    .professional-card:hover {
        transform: none;
    }
}