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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f0f7ff; /* Tom mais claro de #c6deff */
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 30px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #d4e4ff;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid #d4e4ff;
}

.login-container h2 {
    color: #2c5282;
    margin-bottom: 30px;
    font-size: 24px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e6f0ff;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info a {
    color: #2c5282;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #c6deff;
    border-radius: 5px;
    transition: all 0.3s;
    background: #e8f2ff;
}

.user-info a:hover {
    background: #c6deff;
    color: #2a4365;
}

/* Navigation */
nav ul {
    display: flex;
    gap: 15px;
    list-style: none;
    margin-bottom: 30px;
    padding: 15px;
    background: #e8f2ff;
    border-radius: 8px;
    border: 1px solid #c6deff;
}

nav a {
    color: #2c5282;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

nav a:hover {
    background: #c6deff;
    color: #2a4365;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #c6deff;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #f7fbff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4299e1;
    background: white;
}

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

/* Buttons */
button, .btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.btn-ler {
    background: #38a169;
}

.btn-download {
    background: #4299e1;
}

.btn-remover {
    background: #e53e3e;
    padding: 6px 12px;
    font-size: 14px;
}

.btn-remover:hover {
    background: #c53030;
}

.btn-success {
    background: #38a169;
}

.btn-success:hover {
    background: #2f855a;
}

.btn-warning {
    background: #ed8936;
}

.btn-warning:hover {
    background: #dd6b20;
}

/* Tables */
.document-table, .associations-table, .user-groups-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

.document-table th, 
.associations-table th,
.user-groups-table th {
    background: #c6deff;
    color: #2a4365;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #a0c8ff;
}

.document-table td, 
.associations-table td,
.user-groups-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e6f0ff;
}

.document-table tr:hover,
.associations-table tr:hover,
.user-groups-table tr:hover {
    background-color: #f0f7ff;
}

/* Document status */
.lido {
    opacity: 0.8;
}

.nao-lido {
    background-color: #fffaf0;
}

.status-lido {
    color: #38a169;
    font-weight: 600;
}

.status-nao-lido {
    color: #e53e3e;
    font-weight: 600;
}

/* Document type badges */
.tipo-administrativo {
    background: #4299e1;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tipo-tecnico {
    background: #38a169;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tipo-gestao {
    background: #805ad5;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tipo-geral {
    background: #718096;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tipo-auxiliares {
    background: #ed8936;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Group type badges */
.grupo-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 2px;
}

.grupo-administrativo { background: #bee3f8; color: #2c5282; }
.grupo-tecnico { background: #c6f6d5; color: #22543d; }
.grupo-gestao { background: #e9d8fd; color: #553c9a; }
.grupo-geral { background: #e2e8f0; color: #4a5568; }
.grupo-auxiliares { background: #feebc8; color: #744210; }

/* Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 600;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.message.warning {
    background: #feebc8;
    color: #744210;
    border: 1px solid #fbd38d;
}

.message.info {
    background: #bee3f8;
    color: #2c5282;
    border: 1px solid #90cdf4;
}

/* Document viewer */
.document-info {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #c6deff;
}

.document-info p {
    margin-bottom: 10px;
    font-size: 15px;
}

.document-viewer {
    border: 2px solid #c6deff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.document-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background: #f0f7ff;
    border-radius: 8px;
    border: 1px solid #c6deff;
}

.leitura-registrada {
    color: #38a169;
    font-weight: 600;
}

/* Filters */
.filters {
    background: #e8f2ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #c6deff;
}

.filters a {
    color: #2c5282;
    text-decoration: none;
    margin: 0 10px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.filters a:hover {
    background: #c6deff;
    color: #2a4365;
}

/* Stats */
.stats {
    background: #c6deff;
    color: #2a4365;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid #a0c8ff;
}

/* Upload form */
.upload-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #f0f7ff;
    border-radius: 10px;
    border: 1px solid #c6deff;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal-box {
    background: white;
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    border: 1px solid #c6deff;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e6f0ff;
}

.modal-title {
    color: #2c5282;
    margin: 0;
    font-size: 24px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #718096;
}

/* Danger zone */
.danger-zone {
    border: 2px solid #e53e3e;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: #fff5f5;
}

.danger-zone h3 {
    color: #e53e3e;
    margin-bottom: 15px;
}

/* User groups display */
.user-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .document-actions {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .document-table, 
    .associations-table,
    .user-groups-table {
        display: block;
        overflow-x: auto;
    }
    
    .modal-box {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f0f7ff;
    border-radius: 6px;
    border: 1px solid #c6deff;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-item:hover {
    background: #e8f2ff;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    margin: 0;
}

/* Card layout */
.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    border: 1px solid #e6f0ff;
}

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

.card-title {
    color: #2c5282;
    margin: 0;
    font-size: 20px;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid #e6f0ff;
    margin-bottom: 25px;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    color: #718096;
    transition: all 0.3s;
}

.tab:hover {
    color: #4299e1;
}

.tab.active {
    color: #2c5282;
    border-bottom: 2px solid #4299e1;
}

/* Badge for notification */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.badge-success { background: #c6f6d5; color: #22543d; }
.badge-warning { background: #feebc8; color: #744210; }
.badge-danger { background: #fed7d7; color: #742a2a; }
.badge-info { background: #bee3f8; color: #2c5282; }
/* Estilos para tipos de arquivo */
.file-document { color: #4299e1; }
.file-image { color: #38a169; }
.file-audio { color: #ed8936; }
.file-video { color: #9f7aea; }
.file-other { color: #a0aec0; }

.file-icon {
    font-size: 20px;
    margin-right: 8px;
}

/* Player customizado */
.media-player {
    background: #2d3748;
    border-radius: 8px;
    padding: 15px;
    color: white;
}

.media-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.media-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.media-progress {
    flex: 1;
    height: 6px;
    background: #4a5568;
    border-radius: 3px;
    overflow: hidden;
}

.media-progress-bar {
    height: 100%;
    background: #4299e1;
    width: 0%;
}

/* Thumbnail de vídeo */
.video-thumbnail {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 5px;
    margin-bottom: 15px;
    position: relative;
}

.video-thumbnail:after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
