/* NaviPort RD - Estilos base compartidos */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('/media/Ship.jpeg') no-repeat center center fixed;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
    position: relative;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* === NAVEGACIÓN === */
.navbar {
    background: linear-gradient(135deg, #2c3e50, #34495e) !important;
    color: white !important;
    padding: 15px 30px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.navbar-brand {
    display: flex !important;
    align-items: center !important;
    font-size: 24px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    color: white !important;
    margin-right: 0 !important;
}

.navbar-brand .logo {
    width: 40px;
    height: 40px;
    background: #3498db;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.navbar-menu {
    display: flex !important;
    list-style: none !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-direction: row !important;
}

.navbar-menu li {
    position: relative;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255,255,255,0.8);
}

.navbar-menu li:hover,
.navbar-menu li.active {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateY(-2px);
}

.navbar-menu li a {
    color: inherit;
    text-decoration: none;
}

.navbar-user {
    display: flex;
    align-items: center;
    position: relative;
}

.navbar-user span {
    margin-right: 15px;
    font-weight: 500;
}

.navbar-user .user-name {
    font-weight: 500;
    font-size: 16px;
}

.navbar-user .user-role {
    font-size: 12px;
    color: #7f8c8d;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #e74c3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    padding: 10px 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.navbar-user:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.logout-link {
    display: block;
    padding: 10px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: background 0.3s ease;
}

.logout-link:hover {
    background: #f8f9fa;
}

/* === ÁREA DE CONTENIDO === */
.content-area {
    background: rgba(255,255,255,0.95);
    margin: 0 20px 20px 20px;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    min-height: calc(100vh - 140px);
}

/* === FORMULARIOS === */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.form-container h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 22px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* === GRID DE FORMULARIOS === */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

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

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-control.is-invalid {
    border-color: #e74c3c;
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* === BOTONES === */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #d68910);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d68910, #b7950b);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
}

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

.btn-outline-primary {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-outline-primary:hover {
    background: #3498db;
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    color: #95a5a6;
    border: 2px solid #95a5a6;
}

.btn-outline-secondary:hover {
    background: #95a5a6;
    color: white;
}

/* === ALERTAS === */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

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

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* === TABLAS === */
.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: white;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
}

.table th,
.table td {
    padding: 12px;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.table th:last-child,
.table td:last-child {
    border-right: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    border-top: none;
}

.table tbody tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}

.table tbody tr:nth-of-type(even) {
    background-color: white;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,.04);
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table-dark {
    color: #fff;
    background-color: #2c3e50;
}

.table-dark th,
.table-dark td {
    border-color: #34495e;
}

/* === BADGES Y STATUS === */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
}

.bg-primary { background-color: #3498db; color: white; }
.bg-secondary { background-color: #95a5a6; color: white; }
.bg-success { background-color: #27ae60; color: white; }
.bg-danger { background-color: #e74c3c; color: white; }
.bg-warning { background-color: #f39c12; color: white; }
.bg-info { background-color: #17a2b8; color: white; }

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-approved { background: #27ae60; color: white; }
.status-pending { background: #f39c12; color: white; }
.status-rejected { background: #e74c3c; color: white; }

/* === UTILIDADES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: #3498db; }
.text-secondary { color: #95a5a6; }
.text-success { color: #27ae60; }
.text-danger { color: #e74c3c; }
.text-warning { color: #f39c12; }
.text-info { color: #17a2b8; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }

.ms-1 { margin-left: 0.25rem; }
.ms-2 { margin-left: 0.5rem; }
.ms-3 { margin-left: 1rem; }

.w-100 { width: 100%; }

/* === DASHBOARD CARDS === */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
    color: white;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.card-subtitle {
    color: #7f8c8d;
    font-size: 14px;
}

.progress-container {
    background: #ecf0f1;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}

.progress-bar.blue { background: linear-gradient(90deg, #3498db, #2980b9); }
.progress-bar.green { background: linear-gradient(90deg, #27ae60, #229954); }
.progress-bar.orange { background: linear-gradient(90deg, #f39c12, #d68910); }
.progress-bar.red { background: linear-gradient(90deg, #e74c3c, #c0392b); }

/* === TABLA DE DATOS === */
.data-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-header {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.table-content {
    overflow-x: auto;
}

/* === NOTIFICACIONES === */
.notification-bar {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.notification-bar.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.notification-bar.success {
    background: linear-gradient(135deg, #27ae60, #229954);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

/* === PAGINACIÓN === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

.pagination .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
    }
    
    .navbar-menu {
        margin-top: 15px;
        gap: 15px;
    }
    
    .content-area {
        margin: 0 10px 20px 10px;
        padding: 20px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* === DROPDOWN MENU === */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #3498db;
    padding-left: 25px;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajustar navbar para dropdown */
.navbar-menu .dropdown > a {
    cursor: pointer;
}

