:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --warning-color: #ffc107;
    --danger-color: #f72585;
    --info-color: #17a2b8;
    --dark-color: #1d3557;
    --light-color: #f8f9fa;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #eb2b36 10%, #889097 50%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

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

.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

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

.btn-success:hover {
    background: #3ab8d9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
}

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

.btn-danger:hover {
    background: #e01a6f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(247, 37, 133, 0.3);
}

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

.btn-warning:hover {
    background: #e6a700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

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

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.3);
}

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

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

.btn-sm {
    padding: 8px 12px;
    font-size: 0.8em;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.navbar {
    background: white;
    border-radius: 15px;
    padding: 15px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.navbar h1 {
    color: var(--dark-color);
    margin: 0;
}

.navbar div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-icon {
    font-size: 2.5em;
    color: var(--primary-color);
}

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

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

.admin-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-icon {
    font-size: 2.5em;
    color: var(--primary-color);
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.section-icon {
    font-size: 1.3em;
}

.welcome-message {
    color: var(--dark-color);
    font-weight: 500;
    margin-right: 15px;
}

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

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stat-icon {
    font-size: 2.8em;
    margin-bottom: 15px;
    opacity: 0.8;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.stat-label {
    color: #666;
    font-weight: 500;
    font-size: 1em;
}

.system-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.system-stats .stat-number,
.system-stats .stat-label {
    color: white;
}

.system-stats::before {
    background: linear-gradient(90deg, #ffd89b, #19547b);
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.file-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
}

.file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.file-header {
    display: flex;
    align-items: start;
    gap: 15px;
    margin-bottom: 15px;
}

.file-icon {
    font-size: 2.2em;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    margin: 0 0 5px 0;
    color: var(--dark-color);
    word-break: break-word;
    line-height: 1.3;
}

.file-meta {
    color: #666;
    font-size: 0.85em;
    margin: 3px 0;
}

.file-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-file {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 0.85em;
    text-align: center;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #f0f4ff;
    transform: scale(1.02);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    display: inline-block;
}

.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.badge-admin {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    font-size: 0.7em;
    padding: 3px 8px;
    margin-left: 5px;
    border-radius: 10px;
}

.user-badge {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.admin-badge {
    background: var(--warning-color);
    color: white;
}

.no-limit-badge {
    background: var(--success-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 500;
    margin-top: 5px;
    display: inline-block;
}

.tab-navigation {
    display: flex;
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #666;
    font-weight: 500;
    margin: 0 5px;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

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

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid #e9ecef;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1em;
    flex-shrink: 0;
}

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

.user-details {
    flex: 1;
    min-width: 0;
}

.user-details strong {
    display: block;
    margin-bottom: 2px;
    color: var(--dark-color);
}

.user-details small {
    color: #666;
    font-size: 0.85em;
}

.file-info {
    display: flex;
    flex-direction: column;
}

.file-info strong {
    color: var(--dark-color);
    margin-bottom: 2px;
}

.file-info small {
    color: #666;
    font-size: 0.85em;
}

.file-size {
    font-size: 0.9em;
    color: #666;
}

.storage-info {
    text-align: center;
    margin-top: 10px;
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
}

.storage-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    text-align: left;
}

.storage-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.8em;
}

.storage-detail:last-child {
    margin-bottom: 0;
}

.search-box {
    margin-bottom: 20px;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: #666;
    background: white;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.empty-state .icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #666;
}

.empty-state p {
    margin: 0 0 20px 0;
    font-size: 1em;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.hero {
    text-align: center;
    padding: 80px 20px;
    color: white;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.feature-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.file-icon {
    font-size: 3em;
    margin-bottom: 10px;
    text-align: center;
    display: block;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.card, .file-card {
    animation: fadeIn 0.5s ease-out;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.btn:focus,
.form-control:focus,
.tab-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsividade */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .navbar div {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .file-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5em;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 20px;
    }
    
    .upload-area {
        padding: 20px;
    }
    
    .dashboard-header,
    .admin-header {
        flex-direction: column;
        gap: 15px;
        align-items: start;
    }
    
    .quick-actions,
    .admin-nav {
        width: 100%;
        justify-content: center;
    }
    
    .tab-navigation {
        flex-direction: column;
        padding: 10px;
    }
    
    .tab-btn {
        text-align: left;
        margin: 2px 0;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-sm {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .data-table {
        font-size: 0.9em;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .hero {
        padding: 40px 10px;
    }
    
    .hero h1 {
        font-size: 2em;
    }
    
    .hero p {
        font-size: 1.1em;
    }
    
    .logo-text {
        font-size: 1.5em;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .stat-icon {
        font-size: 2.2em;
    }
}