/* ============================================
   Glass Effects & Modern Styling
   Logistics Contact System
   Version: 2.0 (Bootstrap 4 Compatible)
============================================ */

:root {
    --primary-white: rgba(255, 255, 255, 0.95);
    --glass-white: rgba(255, 255, 255, 0.25);
    --glass-black: rgba(0, 0, 0, 0.05);
    --dark: #1a1a1a;
    --accent: #2c3e50;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, rgba(0,0,0,0.95) 0%, rgba(20,20,20,0.98) 100%);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);
    --border-glass-light: 1px solid rgba(255, 255, 255, 0.18);
}

/* ============================================
   Base Styles
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: url('../images/img1.webp') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    color: white;
}


/* ============================================
   Glass Effects Core
============================================ */
.glass-card {
    background: var(--glass-white);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--border-glass-light);
    border-radius: 20px;
    box-shadow: var(--shadow-glass);
    padding: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--border-glass);
    color: white;
}

.glass-light {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--dark);
}

/* ============================================
   Admin Wrapper & Background
============================================ */
.admin-wrapper {
    background: url('../images/logistics-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    position: relative;
}

.admin-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.admin-content {
    position: relative;
    z-index: 1;
    padding: 30px 20px;
}

/* ============================================
   Login Page
============================================ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('../images/logistics-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    padding: 20px;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 0;
}

.login-card {
    width: 100%;
    max-width: 450px;
    z-index: 1;
    position: relative;
}

/* ============================================
   NAVBAR - BOOTSTRAP 4 FIXED VERSION
============================================ */
.nav-glass {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1030;
}

.nav-glass .navbar-brand {
    color: white !important;
    font-weight: 600;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-glass .navbar-brand i {
    color: #667eea;
    font-size: 1.5rem;
}

.nav-glass .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.7rem 1rem !important;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-glass .nav-link i {
    font-size: 0.9rem;
}

.nav-glass .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-glass .nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* Navbar Toggler - Fixed for Bootstrap 4 */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Dropdown Menu - Glass Effect */
.nav-glass .dropdown-menu {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: 15px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-glass);
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-glass .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-glass .dropdown-item i {
    width: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.nav-glass .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.nav-glass .dropdown-item:hover i {
    color: white;
}

.nav-glass .dropdown-item.active {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

.nav-glass .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* ============================================
   STATISTICS CARDS
============================================ */
.stat-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: 20px;
    padding: 25px;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   TABLES - Glass Effect
============================================ */
.table-responsive {
    border-radius: 15px;
    overflow-x: auto;
}

.table-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 15px;
    overflow: hidden;
    color: white;
    margin-bottom: 0;
}

.table-glass thead {
    background: rgba(0, 0, 0, 0.5);
}

.table-glass thead th {
    border-bottom: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 15px;
}

.table-glass tbody tr {
    transition: all 0.3s ease;
}

.table-glass tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.table-glass td {
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
    vertical-align: middle;
    padding: 15px;
}

/* Status Badges */
.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.badge-info { background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); }
.badge-success { background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%); }
.badge-warning { background: linear-gradient(135deg, #ffc107 0%, #d39e00 100%); color: #000; }
.badge-danger { background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%); }

/* ============================================
   BUTTONS - Glass Style
============================================ */
.btn-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.btn-glass:active {
    transform: translateY(0);
}

.btn-glass-sm {
    padding: 6px 15px;
    font-size: 0.875rem;
}

.btn-glass-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

.btn-glass:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   FORMS - Glass Inputs
============================================ */
.glass-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 20px;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
}

.glass-input:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    outline: none;
    color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.glass-input.error {
    border-color: #dc3545;
}

select.glass-input option {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
}

textarea.glass-input {
    min-height: 100px;
    resize: vertical;
}

/* ============================================
   SEARCH BOX
============================================ */
.search-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 10px 20px;
    color: white;
    width: 100%;
    min-width: 250px;
    transition: all 0.3s ease;
}

.search-box:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

/* ============================================
   PAGINATION
============================================ */
.pagination {
    gap: 5px;
}

.pagination .page-link {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: rgba(102, 126, 234, 0.5);
    border-color: rgba(102, 126, 234, 0.8);
    color: white;
}

.pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   SMS LOGS
============================================ */
.sms-log-card {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-left: 4px solid;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sms-log-card:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateX(5px);
}

.sms-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sms-log-body {
    padding: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.sms-log-footer {
    padding: 10px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    opacity: 0.7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* SMS Status Colors */
.sms-log-card[data-status="sent"] { border-left-color: #4CAF50; }
.sms-log-card[data-status="pending"] { border-left-color: #ffc107; }
.sms-log-card[data-status="failed"] { border-left-color: #dc3545; }

/* ============================================
   MODALS - Glass Effect (Bootstrap 4 Compatible)
============================================ */
.modal-content.glass-dark {
    background: var(--gradient-dark);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: 20px;
    color: white;
    box-shadow: var(--shadow-glass);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem 1.5rem;
}

.modal-header .close {
    color: white !important;
    opacity: 0.8;
    text-shadow: none;
    font-size: 1.8rem;
    font-weight: 300;
    transition: all 0.3s ease;
}

.modal-header .close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem 1.5rem;
}

/* ============================================
   CUSTOM MODALS (Fallback)
============================================ */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s;
}

.custom-modal-content {
    position: relative;
    background: var(--gradient-dark);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 5% auto;
    padding: 2rem;
    border: var(--border-glass);
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    color: white;
    animation: slideIn 0.3s;
    box-shadow: var(--shadow-glass);
}

.custom-modal-close {
    color: rgba(255, 255, 255, 0.7);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.custom-modal-close:hover {
    color: white;
    transform: rotate(90deg);
}

/* ============================================
   NOTIFICATIONS
============================================ */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 4px solid;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

.custom-notification.notification-success { border-left-color: #28a745; }
.custom-notification.notification-error { border-left-color: #dc3545; }
.custom-notification.notification-warning { border-left-color: #ffc107; }
.custom-notification.notification-info { border-left-color: #17a2b8; }

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   UTILITY CLASSES
============================================ */
.text-white-50 { color: rgba(255, 255, 255, 0.5); }
.text-white-70 { color: rgba(255, 255, 255, 0.7); }

.bg-dark-transparent { background: rgba(0, 0, 0, 0.5); }

.rounded-lg { border-radius: 15px; }
.rounded-xl { border-radius: 20px; }

.cursor-pointer { cursor: pointer; }

/* Loading Spinner */
.fa-spinner {
    animation: spin 1s infinite linear;
}

/* Form Validation */
.is-invalid {
    border-color: #dc3545 !important;
}

.invalid-feedback {
    display: block;
    color: #ff8a8a;
    font-size: 80%;
    margin-top: 0.25rem;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 1199.98px) {
    .glass-card { padding: 1.5rem; }
    .stat-number { font-size: 1.8rem; }
}

@media (max-width: 991.98px) {
    .admin-content { padding: 20px; }
    .stat-card { padding: 20px; }
    .stat-icon { font-size: 2rem; }
    .stat-number { font-size: 1.6rem; }
}

@media (max-width: 767.98px) {
    /* Navbar Mobile */
    .nav-glass .navbar-collapse {
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem;
        border-radius: 15px;
        margin-top: 0.5rem;
        border: var(--border-glass);
    }
    
    .nav-glass .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 10px;
    }
    
    .nav-glass .dropdown-menu {
        background: rgba(0, 0, 0, 0.5);
        border: none;
        margin-left: 1rem;
        width: calc(100% - 2rem);
    }
    
    /* Cards */
    .glass-card {
        padding: 1.25rem;
    }
    
    .stat-card {
        margin-bottom: 20px;
    }
    
    .stat-number { font-size: 1.5rem; }
    
    /* Tables */
    .table-responsive {
        border-radius: 10px;
    }
    
    .table-glass td,
    .table-glass th {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    /* Search Box */
    .search-box {
        min-width: 200px;
    }
    
    /* Modals */
    .custom-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    /* Notifications */
    .custom-notification {
        left: 20px;
        right: 20px;
        min-width: auto;
    }
}

@media (max-width: 575.98px) {
    .admin-content { padding: 15px; }
    
    .glass-card { padding: 1rem; }
    
    .btn-glass {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .pagination .page-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .modal-dialog {
        margin: 10px;
    }
}

/* ============================================
   PRINT STYLES
============================================ */
@media print {
    .nav-glass,
    .sidebar,
    .btn-glass,
    .pagination,
    .modal-footer {
        display: none !important;
    }
    
    .glass-card,
    .table-glass {
        background: white !important;
        color: black !important;
        box-shadow: none;
    }
    
    .table-glass td,
    .table-glass th {
        color: black !important;
        border-color: #ddd !important;
    }
}