/* ============================================
   Sistema de Setlists MLA - Stylesheet
   ============================================ */

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

:root {
    /* Cores Hope Worship - Tons de Azul */
    --primary: #3b82f6; /* Azul vibrante */
    --primary-dark: #2563eb;
    --secondary: #06b6d4; /* Ciano vibrante */
    --secondary-dark: #0891b2;
    --accent: #0ea5e9; /* Azul claro para destaques */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
    
    /* Gradiente principal - Azul */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    --gradient-dark: linear-gradient(135deg, #1e40af 0%, #0369a1 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-primary);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
    position: relative;
}

/* Adicionar textura sutil como na imagem */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER
   ============================================ */
.main-header {
    background: white;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
    font-size: 24px;
}

.logo-icon {
    font-size: 32px;
    margin-right: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.main-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-link.admin-link {
    background: var(--primary);
    color: white;
}

.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.user-info:hover {
    background: var(--light);
}

.user-icon {
    font-size: 24px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    display: none;
    flex-direction: column;
}

.user-dropdown.show {
    display: flex;
}

.user-dropdown a {
    padding: 12px 20px;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: var(--light);
    color: var(--primary);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

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

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-header h1 {
    color: var(--primary);
    margin: 10px 0;
    font-size: 28px;
}

.subtitle {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 20px;
}

.bible-verse {
    background: var(--gradient-primary);
    color: white;
    padding: 15px;
    border-radius: var(--radius);
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
}

.bible-verse p {
    font-style: italic;
    margin-bottom: 5px;
}

.bible-verse span {
    font-size: 12px;
    opacity: 0.9;
}

.auth-form {
    margin: 30px 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

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

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

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow);
}

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

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

.btn-secondary:hover {
    background: #4b5563;
}

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

.btn-success:hover {
    background: #059669;
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-icon {
    font-size: 18px;
}

/* ============================================
   DASHBOARD
   ============================================ */
main {
    padding: 30px 0;
    min-height: calc(100vh - 70px - 100px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.page-header h1 {
    font-size: 28px;
    color: var(--dark);
}

.page-actions {
    display: flex;
    gap: 10px;
}

.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: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border-left: 4px solid transparent;
    background-clip: padding-box;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--primary);
}

.stat-icon {
    font-size: 48px;
}

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

.stat-content p {
    color: var(--gray);
    font-size: 14px;
}

.stat-card-admin {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.stat-card-admin .stat-content h3,
.stat-card-admin .stat-content p {
    color: white;
}

.stat-card-admin a {
    color: white;
    text-decoration: underline;
}

/* ============================================
   SETLISTS
   ============================================ */
.setlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.setlist-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.setlist-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.setlist-header h3 {
    color: var(--dark);
    margin-bottom: 5px;
}

.setlist-date {
    color: var(--gray);
    font-size: 14px;
}

.setlist-description {
    color: var(--gray);
    font-size: 14px;
    margin: 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.setlist-info {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.info-item {
    color: var(--gray);
    font-size: 13px;
}

.setlist-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.empty-state {
    background: white;
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h2 {
    color: var(--dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* ============================================
   SETLIST BUILDER
   ============================================ */
.setlist-editor {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.editor-section {
    margin-bottom: 40px;
}

.editor-section h2 {
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.setlist-builder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.musicas-disponiveis,
.musicas-selecionadas {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    min-height: 400px;
}

.musicas-disponiveis h3,
.musicas-selecionadas h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}

.musicas-list {
    max-height: 500px;
    overflow-y: auto;
}

.musica-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.musica-item:hover {
    background: var(--light);
}

.musica-info strong {
    display: block;
    color: var(--dark);
}

.musica-info small {
    color: var(--gray);
    font-size: 12px;
}

.setlist-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light);
    border-radius: var(--radius);
    border: 2px solid var(--border);
}

.item-order {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-number {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    min-width: 30px;
    text-align: center;
}

.order-controls {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btn-order {
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 10px;
    transition: var(--transition);
}

.btn-order:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-order:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.item-info {
    flex: 1;
}

.item-info strong {
    display: block;
    color: var(--dark);
    margin-bottom: 3px;
}

.item-info small {
    color: var(--gray);
    font-size: 12px;
}

.item-info input[type="text"] {
    margin-top: 8px;
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
}

.empty-setlist {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--gray);
}

/* ============================================
   PLAYER
   ============================================ */
.player-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.player-container,
.playlist-container {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

#playerYoutube {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.current-track {
    font-weight: 600;
    color: var(--primary);
}

.playlist-container h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

.playlist {
    max-height: 400px;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.playlist-item:hover {
    background: var(--light);
}

.playlist-item.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: var(--primary);
}

.playlist-item.active .track-info strong,
.playlist-item.active .track-info small,
.playlist-item.active .track-number {
    color: white;
}

.track-number {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    min-width: 30px;
    text-align: center;
}

.track-info {
    flex: 1;
}

.track-info strong {
    display: block;
    color: var(--dark);
}

.track-info small {
    color: var(--gray);
    font-size: 12px;
}

.track-key {
    background: var(--light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: var(--primary);
}

.playlist-item.active .track-key {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ============================================
   LYRICS
   ============================================ */
.lyrics-section {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.lyrics-section h3 {
    color: var(--dark);
    margin-bottom: 20px;
}

.lyrics-card {
    display: none;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.lyrics-card.active {
    display: block;
    border-color: var(--primary);
    background: linear-gradient(to bottom, rgba(99, 102, 241, 0.05), white);
}

.lyrics-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}

.lyrics-header h4 {
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 5px;
}

.lyrics-header small {
    color: var(--gray);
}

.lyrics-content {
    white-space: pre-line;
    line-height: 1.8;
    color: var(--dark);
    font-size: 15px;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

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

.data-table thead {
    background: var(--light);
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: var(--light);
}

.actions-cell {
    display: flex;
    gap: 5px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--primary);
    color: white;
}

/* ============================================
   ADMIN
   ============================================ */
.admin-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.admin-menu-item {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
}

.admin-menu-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.menu-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.admin-menu-item h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.admin-menu-item p {
    color: var(--gray);
    font-size: 14px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    font-size: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info);
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: rgba(0, 0, 0, 0.1);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-section h4 {
    margin-bottom: 10px;
}

.footer-section p {
    font-size: 14px;
    opacity: 0.9;
}

/* ============================================
   SHARED VIEW
   ============================================ */
.shared-header {
    background: white;
    box-shadow: var(--shadow);
    padding: 20px 0;
    margin-bottom: 30px;
}

.shared-header h1 {
    color: var(--primary);
    font-size: 28px;
}

.page-header.shared {
    background: white;
    padding: 30px;
}

.created-by {
    color: var(--gray);
    font-size: 14px;
    margin-top: 5px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .page-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .setlist-builder,
    .player-section {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
