/* Porto Admin Template - DefensurSeguridad */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Porto Admin Colors */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #6c757d;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --sidebar-bg: #2c3e50;
    --sidebar-header-bg: #34495e;
    --sidebar-hover: #34495e;
    --sidebar-active: #3498db;
    --header-bg: #ffffff;
    --content-bg: #f8f9fa;
    --text-color: #495057;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --font-family: 'Open Sans', sans-serif;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    font-family: var(--font-family);
}

body {
    font-family: var(--font-family);
    background-color: var(--content-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* App Layout */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    min-height: 100vh;
    background: var(--sidebar-bg);
    color: #ecf0f1;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 20px;
    background: var(--sidebar-header-bg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ecf0f1;
}

.sidebar-brand i {
    margin-right: 10px;
    color: var(--primary-color);
}

.sidebar-toggle {
    color: #ecf0f1;
    border: none;
    background: none;
    font-size: 1.1rem;
    padding: 5px;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-nav {
    padding: 20px 0;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar-nav .nav {
    padding: 0;
}

.sidebar-nav .nav-item {
    margin: 2px 0;
}

.sidebar-nav .nav-link {
    color: #bdc3c7;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 0;
    position: relative;
    font-weight: 400;
    font-size: 14px;
}

.sidebar-nav .nav-link:hover {
    color: #ecf0f1;
    background: var(--sidebar-hover);
    padding-left: 25px;
}

.sidebar-nav .nav-link.active {
    color: #ecf0f1;
    background: var(--sidebar-active);
    border-right: 3px solid var(--primary-dark);
}

.sidebar-nav .nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Header Styles */
.header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-search {
    position: relative;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    padding: 8px 40px 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--light-color);
    font-size: 14px;
    transition: all 0.3s;
    width: 100%;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-notifications .btn,
.header-profile .btn {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: all 0.3s;
    border: none;
    background: none;
    position: relative;
}

.header-notifications .btn:hover,
.header-profile .btn:hover {
    background: var(--light-color);
    color: var(--text-color);
}

.header-notifications .badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
    padding: 2px 6px;
}

/* Profile Styles */
.profile-avatar {
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.profile-info {
    margin-left: 10px;
    text-align: left;
}

.profile-name {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.2;
}

.profile-role {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.2;
}

/* Breadcrumb */
.breadcrumb-nav {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 30px;
}

.breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
    font-size: 14px;
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 500;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 30px;
    background: var(--content-bg);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    margin-bottom: 20px;
    background: #fff;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 16px;
}

.card-body {
    padding: 20px;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 16px;
    font-size: 14px;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-success {
    background: var(--success-color);
    color: #fff;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning-color);
    color: #fff;
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.btn-info {
    background: var(--info-color);
    color: #fff;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fff;
    margin-bottom: 0;
}

.table thead th {
    background: var(--light-color);
    color: var(--text-color);
    border: none;
    font-weight: 600;
    padding: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-color: var(--border-color);
    font-size: 14px;
}

.table tbody tr:hover {
    background-color: var(--light-color);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: var(--success-color);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left-color: var(--danger-color);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: var(--info-color);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: var(--warning-color);
}

/* Forms */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    transition: all 0.3s;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-select {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    font-size: 14px;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
}

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }

/* Dropdowns */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 8px 0;
    margin-top: 5px;
}

.dropdown-item {
    padding: 8px 20px;
    font-size: 14px;
    transition: all 0.3s;
    color: var(--text-color);
}

.dropdown-item:hover {
    background: var(--light-color);
    color: var(--text-color);
}

.dropdown-header {
    font-weight: 600;
    color: var(--text-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 5px;
}

/* Notification Dropdown */
.notification-dropdown {
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-list {
    max-height: 250px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

.notification-item:hover {
    background: var(--light-color);
    text-decoration: none;
    color: var(--text-color);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
}

.notification-content h6 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
}

.notification-content p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.notification-content small {
    font-size: 12px;
    color: var(--text-muted);
}

.dropdown-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
}

/* Profile Dropdown */
.profile-dropdown {
    width: 250px;
}

/* Footer */
.footer {
    background: var(--header-bg);
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .search-box {
        width: 200px;
    }
    
    .profile-info {
        display: none !important;
    }
    
    .notification-dropdown {
        width: 300px;
    }
}

@media (max-width: 576px) {
    .page-content {
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .search-box {
        width: 150px;
    }
    
    .header {
        padding: 10px 15px;
    }
    
    .notification-dropdown {
        width: 280px;
    }
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Focus styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Text Colors */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Animation for sidebar toggle */
.sidebar.active {
    margin-left: 0;
}

/* Additional Porto Admin specific styles */
.stats-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stats-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

/* Quick Action Buttons */
.quick-action-btn {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    height: 100%;
}

.quick-action-btn:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
    color: var(--text-color);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.quick-action-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    margin-right: 15px;
    flex-shrink: 0;
}

.quick-action-content h6 {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
}

.quick-action-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

















