/**
 * DTX Admin - CPv6 Theme (Porto Admin Exact Match)
 * Professional Admin Layout matching Porto Admin design
 * @version 6.0.0
 * @inspired Porto Admin Template - Exact Design Match
 */

/* ============================================
   CSS VARIABLES - PORTO ADMIN EXACT COLORS
============================================ */
:root {
    /* Porto Admin Color Palette - Exact Match */
    --porto-primary: #0088cc;
    --porto-primary-hover: #0099dd;
    --porto-primary-rgb: 0, 136, 204;
    
    /* Sidebar Colors - Porto Admin */
    --sidebar-bg: #1d2127;
    --sidebar-bg-light: #242930;
    --sidebar-hover: #282d35;
    --sidebar-active-bg: rgba(0, 136, 204, 0.1);
    --sidebar-border: #2d3238;
    
    /* Header Colors */
    --header-bg: #ffffff;
    --header-border: #e4eaec;
    
    /* Content Colors */
    --content-bg: #f6f7fb;
    --content-bg-alt: #ebeef2;
    
    /* Text Colors - Porto Style */
    --text-white: #ffffff;
    --text-white-soft: rgba(255, 255, 255, 0.8);
    --text-white-muted: rgba(255, 255, 255, 0.5);
    --text-dark: #2e3e4e;
    --text-muted: #8b95a5;
    --text-light: #b3bcc6;
    
    /* Borders & Shadows */
    --border-color: #e4eaec;
    --border-dark: #2d3238;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    
    /* Dimensions */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 60px;
    --header-height: 60px;
    
    /* Typography - Porto Admin Uses Noto Sans */
    --font-family: 'Inter', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 13px;
    --font-size-sm: 12px;
    --font-size-lg: 14px;
    --font-size-xl: 16px;
    
    /* Alert Colors - Porto Style */
    --alert-success-bg: #dff0d8;
    --alert-success-border: #d6e9c6;
    --alert-success-text: #3c763d;
    
    --alert-info-bg: #d9edf7;
    --alert-info-border: #bce8f1;
    --alert-info-text: #31708f;
    
    --alert-warning-bg: #fcf8e3;
    --alert-warning-border: #faebcc;
    --alert-warning-text: #8a6d3b;
    
    --alert-danger-bg: #f2dede;
    --alert-danger-border: #ebccd1;
    --alert-danger-text: #a94442;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.35s ease;
}

/* ============================================
   GLOBAL RESETS & BASE STYLES
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-dark);
    background-color: var(--content-bg);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
}

ul, ol {
    list-style: none;
}

/* ============================================
   MAIN WRAPPER
============================================ */
.dtx-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--content-bg);
}

/* ============================================
   SIDEBAR - PORTO ADMIN EXACT STYLE
============================================ */
.dtx-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--text-white);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width var(--transition-base), transform var(--transition-base);
    z-index: 1040;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

/* Scrollbar Styling */
.dtx-sidebar::-webkit-scrollbar {
    width: 5px;
}

.dtx-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.dtx-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.dtx-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   SIDEBAR BRAND - PORTO STYLE
============================================ */
.sidebar-brand {
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-dark);
    background-color: rgba(0, 0, 0, 0.15);
}

.sidebar-brand h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.3px;
}

.sidebar-brand h4 i {
    font-size: 22px;
    color: var(--text-white);
    opacity: 0.9;
}

/* ============================================
   SIDEBAR NAVIGATION - PORTO EXACT MATCH
============================================ */
.sidebar-nav {
    padding: 15px 0 20px 0;
}

/* Menu Section Headers (like "APPS") */
.nav-section-title {
    padding: 15px 20px 8px 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-white-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   SIDEBAR USER PROFILE SECTION
============================================ */
.sidebar-user {
    position: relative;
    padding: 25px 20px;
    margin-bottom: 5px;
    text-align: center;
    background-image: url('../img/sidebar-user-bg.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.sidebar-user::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(29, 33, 39, 0.4), var(--sidebar-bg));
    z-index: 1;
}

.sidebar-user-content {
    position: relative;
    z-index: 2;
}

.sidebar-user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    margin: 0 auto 12px auto;
    overflow: hidden;
    background-color: var(--sidebar-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-avatar i {
    font-size: 30px;
    color: var(--text-white-muted);
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-user-name {
    color: var(--text-white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.sidebar-user-name i {
    font-size: 10px;
    color: var(--text-white-muted);
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--text-white-muted);
}

/* Sidebar Collapsed State Adjustments */
body.sidebar-collapsed .sidebar-user {
    padding: 15px 0;
    background-image: none;
    background-color: transparent;
}

body.sidebar-collapsed .sidebar-user::before {
    display: none;
}

body.sidebar-collapsed .sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-width: 2px;
    margin-bottom: 0;
}

body.sidebar-collapsed .sidebar-user-info {
    display: none;
}

/* Nav Items */
.sidebar-nav .nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-nav .nav-item {
    position: relative;
}

/* Nav Links - Porto Style */
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    color: var(--text-white-soft);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: var(--text-white);
    border-left-color: transparent;
}

/* Active State - Porto Blue Highlight */
.sidebar-nav .nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--porto-primary);
    border-left-color: var(--porto-primary);
    font-weight: 600;
}

.sidebar-nav .nav-link.active i {
    color: var(--porto-primary);
}

/* Icons */
.sidebar-nav .nav-link i {
    min-width: 20px;
    width: 20px;
    font-size: 15px;
    margin-right: 12px;
    text-align: center;
    color: var(--text-white-muted);
    transition: color var(--transition-fast);
}

.sidebar-nav .nav-link:hover i {
    color: var(--text-white);
}

/* Menu Text */
.sidebar-nav .menu-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   SUBMENU - PORTO ACCORDION STYLE
============================================ */
.nav-item.has-submenu .submenu-arrow {
    margin-left: auto;
    font-size: 9px;
    color: var(--text-white-muted);
    transition: transform var(--transition-base), color var(--transition-fast);
}

.nav-item.has-submenu .nav-link:hover .submenu-arrow {
    color: var(--text-white);
}

.nav-item.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

/* Submenu Container */
.submenu {
    max-height: 0;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.15);
    transition: max-height var(--transition-base) ease;
}

.nav-item.has-submenu.open .submenu {
    max-height: 800px;
}

/* Submenu Items */
.submenu li {
    margin: 0;
}

.submenu .nav-link {
    padding: 9px 20px 9px 52px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-white-soft);
    border-left: 3px solid transparent;
}

.submenu .nav-link:before {
    content: '−';
    position: absolute;
    left: 38px;
    font-size: 14px;
    color: var(--text-white-muted);
}

.submenu .nav-link:hover {
    color: var(--text-white);
    background-color: rgba(255, 255, 255, 0.03);
}

.submenu .nav-link.active {
    color: var(--porto-primary);
    background-color: var(--sidebar-active-bg);
    border-left-color: var(--porto-primary);
}

.submenu .nav-link.active:before {
    color: var(--porto-primary);
}

.submenu .nav-link i {
    display: none;
}

/* ============================================
   SIDEBAR FOOTER
============================================ */
.sidebar-footer {
    padding: 15px 20px;
    margin-top: auto;
    border-top: 1px solid var(--border-dark);
    text-align: center;
}

.sidebar-footer small {
    color: var(--text-white-muted);
    font-size: 11px;
}

/* ============================================
   MAIN CONTENT AREA
============================================ */
.dtx-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition-base);
    background-color: var(--content-bg);
}

/* ============================================
   HEADER - PORTO STYLE
============================================ */
.dtx-header {
    height: var(--header-height);
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Icon Buttons */
.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 3px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.btn-icon:hover {
    background-color: #f4f5f7;
    color: var(--text-dark);
}

.btn-icon i {
    font-size: 16px;
}

/* Notification Badge */
.badge-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 7px;
    height: 7px;
    background-color: #dc3545;
    border-radius: 50%;
    border: 2px solid var(--header-bg);
}

/* ============================================
   USER MENU - PORTO STYLE
============================================ */
.user-menu-container {
    position: relative;
    margin-left: 5px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.user-profile:hover {
    background-color: #f4f5f7;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--porto-primary), #00a3ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    min-width: 200px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    box-shadow: var(--shadow-md);
    padding: 5px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 1050;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 15px;
    color: var(--text-dark);
    font-size: 13px;
    transition: background-color var(--transition-fast);
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f6f7fb;
}

.dropdown-item.danger {
    color: #dc3545;
}

.dropdown-item.danger:hover {
    background-color: rgba(220, 53, 69, 0.06);
}

.dropdown-item i {
    width: 16px;
    font-size: 14px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 5px 0;
}

/* ============================================
   CONTENT AREA
============================================ */
.dtx-content {
    flex: 1;
    padding: 25px;
}

/* Page Header */
.page-header {
    margin-bottom: 20px;
}

.page-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.page-description {
    font-size: 12px;
    color: var(--text-muted);
}

/* Breadcrumb - Porto Style */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0 0 20px 0;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.breadcrumb-item {
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: var(--porto-primary);
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: #006699;
}

.breadcrumb-item.active {
    color: var(--text-dark);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 8px;
    color: var(--text-light);
}

/* ============================================
   ALERTS - PORTO STYLE
============================================ */
.alert {
    padding: 12px 15px;
    border-radius: 3px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.alert i {
    font-size: 15px;
    margin-top: 1px;
}

.alert-success {
    background-color: var(--alert-success-bg);
    border-color: var(--alert-success-border);
    color: var(--alert-success-text);
}

.alert-info {
    background-color: var(--alert-info-bg);
    border-color: var(--alert-info-border);
    color: var(--alert-info-text);
}

.alert-warning {
    background-color: var(--alert-warning-bg);
    border-color: var(--alert-warning-border);
    color: var(--alert-warning-text);
}

.alert-danger,
.alert-error {
    background-color: var(--alert-danger-bg);
    border-color: var(--alert-danger-border);
    color: var(--alert-danger-text);
}

.alert .btn-close {
    margin-left: auto;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.4;
    padding: 0;
    width: 18px;
    height: 18px;
    line-height: 1;
    color: inherit;
}

.alert .btn-close:hover {
    opacity: 0.7;
}

/* ============================================
   FOOTER - PORTO STYLE
============================================ */
.dtx-footer {
    padding: 15px 25px;
    background-color: white;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-right a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-right a:hover {
    color: var(--porto-primary);
}

/* ============================================
   CARDS - PORTO STYLE
============================================ */
.card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: #fafbfc;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background-color: #fafbfc;
    font-size: 12px;
}

/* ============================================
   BUTTONS - PORTO STYLE
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--porto-primary);
    color: white;
    border-color: var(--porto-primary);
}

.btn-primary:hover {
    background-color: #006699;
    border-color: #006699;
}

.btn-success {
    background-color: #47a447;
    color: white;
    border-color: #47a447;
}

.btn-success:hover {
    background-color: #3d8b3d;
}

.btn-danger {
    background-color: #d9534f;
    color: white;
    border-color: #d9534f;
}

.btn-danger:hover {
    background-color: #c9302c;
}

.btn-secondary {
    background-color: #b4bcc8;
    color: white;
    border-color: #b4bcc8;
}

.btn-secondary:hover {
    background-color: #9fa7b3;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 14px;
}

/* ============================================
   SIDEBAR COLLAPSED STATE
============================================ */
body.sidebar-collapsed .dtx-sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .dtx-main {
    margin-left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-brand h4 span {
    opacity: 0;
    display: none;
}

body.sidebar-collapsed .menu-text {
    opacity: 0;
    display: none;
}

body.sidebar-collapsed .submenu-arrow {
    opacity: 0;
    display: none;
}

body.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 11px 0;
}

body.sidebar-collapsed .nav-link i {
    margin: 0;
}

body.sidebar-collapsed .submenu {
    display: none;
}

body.sidebar-collapsed .nav-section-title {
    opacity: 0;
    font-size: 0;
    padding: 0;
    margin: 0;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 991px) {
    .dtx-sidebar {
        transform: translateX(-100%);
    }
    
    .dtx-main {
        margin-left: 0;
    }
    
    body.sidebar-open .dtx-sidebar {
        transform: translateX(0);
    }
    
    body.sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 1035;
        animation: fadeIn 0.2s ease;
    }
    
    .dtx-content {
        padding: 15px;
    }
    
    .page-title {
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .dtx-header {
        padding: 0 15px;
    }
    
    .user-text {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ============================================
   UTILITY CLASSES
============================================ */
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--porto-primary) !important; }
.text-danger { color: #d9534f !important; }
.text-success { color: #47a447 !important; }
.text-white { color: white !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 5px !important; }
.mb-2 { margin-bottom: 10px !important; }
.mb-3 { margin-bottom: 15px !important; }
.mb-4 { margin-bottom: 20px !important; }
.mb-5 { margin-bottom: 30px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 5px !important; }
.mt-2 { margin-top: 10px !important; }
.mt-3 { margin-top: 15px !important; }
.mt-4 { margin-top: 20px !important; }
.mt-5 { margin-top: 30px !important; }

.mx-2 { margin-left: 10px; margin-right: 10px; }
.py-5 { padding-top: 30px; padding-bottom: 30px; }

.d-inline-block { display: inline-block; }
.text-center { text-align: center; }

.fa-3x { font-size: 3em; }

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade {
    transition: opacity var(--transition-fast) linear;
}

.fade:not(.show) {
    opacity: 0;
}

.show {
    opacity: 1;
}

/* Smooth transitions for interactive elements */
.alert-dismissible {
    transition: all var(--transition-base);
}

/* ============================================
   DATA TABLE STYLES - PORTO ADMIN
============================================ */

/* Table Container */
.table-container {
    background-color: white;
    border-radius: 3px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: var(--font-size-base);
}

/* Table Header */
.data-table thead {
    background-color: var(--porto-primary);
    color: white;
}

.data-table thead th {
    padding: 12px 15px;
    font-weight: 600;
    font-size: var(--font-size-base);
    text-align: left;
    border: none;
}

.data-table thead th:first-child {
    text-align: center;
    width: 60px;
}

.data-table thead th:last-child {
    text-align: center;
    width: 120px;
}

/* Table Body */
.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
    background-color: #f6f7fb;
}

.data-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.data-table tbody tr:nth-child(even):hover {
    background-color: #f0f2f5;
}

.data-table tbody td {
    padding: 12px 15px;
    color: var(--text-dark);
    vertical-align: middle;
}

.data-table tbody td:first-child {
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
}

/* Action Buttons Column */
.data-table tbody td.actions {
    text-align: center;
    white-space: nowrap;
}

/* Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0 2px;
    border: none;
    border-radius: 3px;
    background-color: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 13px;
}

.btn-action:hover {
    transform: translateY(-1px);
}

/* Edit Button */
.btn-action.btn-edit {
    color: var(--porto-primary);
}

.btn-action.btn-edit:hover {
    background-color: rgba(0, 136, 204, 0.1);
    color: var(--porto-primary);
}

/* View/Print Button */
.btn-action.btn-view {
    color: #0088cc;
}

.btn-action.btn-view:hover {
    background-color: rgba(0, 136, 204, 0.1);
    color: #006699;
}

/* Delete Button */
.btn-action.btn-delete {
    color: #dc3545;
}

.btn-action.btn-delete:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #c9302c;
}

/* Info/Lock Button */
.btn-action.btn-info {
    color: #17a2b8;
}

.btn-action.btn-info:hover {
    background-color: rgba(23, 162, 184, 0.1);
    color: #138496;
}

/* Table Footer / Pagination Area */
.table-footer {
    padding: 15px 20px;
    background-color: #fafbfc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.table-info {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* Per Page Selector */
.per-page-selector {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.per-page-selector select {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background-color: white;
    color: var(--text-dark);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.per-page-selector select:hover {
    border-color: var(--porto-primary);
}

.per-page-selector select:focus {
    outline: none;
    border-color: var(--porto-primary);
    box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.1);
}


/* Pagination */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 3px;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background-color: white;
    color: var(--text-dark);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.pagination li a:hover {
    background-color: #f6f7fb;
    border-color: var(--porto-primary);
    color: var(--porto-primary);
}

.pagination li.active span,
.pagination li.active a {
    background-color: var(--porto-primary);
    border-color: var(--porto-primary);
    color: white;
    font-weight: 600;
}

.pagination li.disabled a,
.pagination li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive Table */
@media (max-width: 991px) {
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
    
    .table-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .data-table thead th,
    .data-table tbody td {
        padding: 10px 12px;
        font-size: var(--font-size-sm);
    }
    
    .btn-action {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
}

/* ============================================
   DASHBOARD WIDGETS
============================================ */

/* Stat Cards */
.stat-card {
    border-radius: 16px;
    padding: 20px 18px;
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-card.pink {
    background: linear-gradient(135deg, #ffd6e7 0%, #ffe0ed 100%);
}

.stat-card.mint {
    background: linear-gradient(135deg, #c2f5e9 0%, #d9f9f0 100%);
}

.stat-card.cyan {
    background: linear-gradient(135deg, #b3edf8 0%, #d4f4fa 100%);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: white;
    margin-bottom: 12px;
}

.stat-icon.pink {
    background: linear-gradient(135deg, #ff5c99 0%, #ff8fb8 100%);
}

.stat-icon.mint {
    background: linear-gradient(135deg, #48d8a9 0%, #6ce0bd 100%);
}

.stat-icon.cyan {
    background: linear-gradient(135deg, #3fc6de 0%, #6dd5e8 100%);
}

.stat-value {
    font-size: 27px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-change {
    font-size: 13px;
    font-weight: 600;
}

.stat-change.positive {
    color: #27ae60;
}

.stat-change.negative {
    color: #e74c3c;
}

.stat-label {
    font-size: 15px;
    color: #7f8c8d;
    font-weight: 500;
}

/* Chart Cards */
.chart-card {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.chart-card:hover {
    box-shadow: var(--shadow-md);
}

.chart-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.chart-options {
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
}

.chart-body {
    padding: 25px;
}

.chart-placeholder {
    height: 250px;
    background: linear-gradient(135deg, #f6f7fb 0%, #fafbfc 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.chart-footer {
    padding: 15px 25px;
    background: #fafbfc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.chart-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--porto-primary);
    opacity: 0.1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-stat-info h4 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.chart-stat-info .badge {
    font-size: 10px;
    padding: 2px 6px;
}

.chart-stat-info p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* Support Card */
.support-card {
    border-radius: 8px;
    border: none;
    border-left: 4px solid var(--porto-primary);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base);
}

.support-card:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-md);
}

.support-card-body {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.support-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--porto-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    color: white;
    flex-shrink: 0;
}

.support-content h3 {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-weight: 500;
}

.support-count {
    font-size: 31px;
    font-weight: 700;
    color: var(--text-dark);
    margin-right: 10px;
}

.support-unread {
    font-size: 15px;
    color: var(--porto-primary);
}

/* Donut Chart Legend */
.donut-legend {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.donut-legend li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-dark);
}

.donut-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.donut-center-value {
    text-align: center;
    margin: 20px 0;
}

.donut-center-value h2 {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.donut-center-value .badge {
    font-size: 12px;
    padding: 4px 10px;
}

/* Responsive Dashboard */
@media (max-width: 991px) {
    .stat-card {
        margin-bottom: 15px;
    }
    
    .chart-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 767px) {
    .stat-value {
        font-size: 28px;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .support-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}

/* ============================================
   LOGIN PAGE - PORTO ADMIN STYLE
============================================ */

/* Login Page Body Override */
body.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1d2127 0%, #2c3e50 50%, #1d2127 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background shapes */
body.login-page::before,
body.login-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: loginFloat 25s infinite ease-in-out;
}

body.login-page::before {
    width: 500px;
    height: 500px;
    background: var(--porto-primary);
    top: -150px;
    left: -150px;
}

body.login-page::after {
    width: 400px;
    height: 400px;
    background: #47a447;
    bottom: -100px;
    right: -100px;
    animation-delay: -12s;
}

@keyframes loginFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, 30px) scale(1.05); }
    50% { transform: translate(0, 50px) scale(1); }
    75% { transform: translate(-30px, 30px) scale(0.95); }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
}

/* Login Card - Porto Style */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 5px;
    padding: 40px 35px;
    box-shadow: 
        0 20px 50px -10px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: loginSlideUp 0.5s ease-out;
}

@keyframes loginSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 180px;
    height: auto;
    margin-bottom: 15px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Form Groups */
.login-card .form-group {
    margin-bottom: 18px;
}

.login-card .form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-card .input-wrapper {
    position: relative;
}

.login-card .input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    transition: color var(--transition-fast);
}

.login-card .form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    background: #fff;
    transition: all var(--transition-fast);
    outline: none;
}

.login-card .form-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.login-card .form-input:focus {
    border-color: var(--porto-primary);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

.login-card .form-input:focus + i,
.login-card .input-wrapper:focus-within i {
    color: var(--porto-primary);
}

/* Login Button - Porto Primary */
.btn-login {
    width: 100%;
    padding: 12px 20px;
    background: var(--porto-primary);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    background: var(--porto-primary-hover);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.35);
}

.btn-login:active {
    transform: translateY(1px);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-login i {
    font-size: 12px;
}

/* Error Message - Porto Style */
.login-error {
    background: var(--alert-danger-bg);
    border: 1px solid var(--alert-danger-border);
    color: var(--alert-danger-text);
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: loginShake 0.4s ease-in-out;
}

@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.login-error i {
    font-size: 15px;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* Session Expired Button */
.btn-warning-custom {
    background: #f0ad4e;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-warning-custom:hover {
    background: #ec971f;
    box-shadow: 0 4px 12px rgba(240, 173, 78, 0.35);
}

/* Login Modal */
.login-page .modal-content {
    border-radius: 5px;
    border: none;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.3);
}

.login-page .modal-header {
    background: var(--porto-primary);
    border-radius: 5px 5px 0 0;
    padding: 15px 20px;
}

.login-page .modal-header .modal-title {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.login-page .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.login-page .modal-body {
    padding: 25px;
}

/* Login Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-logo {
        width: 150px;
    }
    
    .login-title {
        font-size: 18px;
    }
}


.bg-primary {
    background-color: #006699 !important;
}

/* ============================================
   TABLE HEADER SKINS
============================================ */
.thead-skin-dark,
.thead-skin-dark th {
    background-color: #242930 !important;
    background-image: linear-gradient(180deg, #242930 0%, #1d2127 100%) !important;
    color: #ffffff !important;
    border-color: #2d3238 !important;
}

.thead-skin-primary,
.thead-skin-primary th {
    background-color: #0088cc !important;
    background-image: linear-gradient(180deg, #0088cc 0%, #0077b3 100%) !important;
    color: #ffffff !important;
    border-color: #0077b3 !important;
}

.thead-skin-muted,
.thead-skin-muted th {
    background-color: #f6f7fb !important;
    color: #2e3e4e !important;
    border-bottom: 2px solid #e4eaec !important;
}

