/* ==========================================
   Local css
   ========================================== */

:root {
    --header-height: 60px;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    --primary-color: #D97D55;
    --text-color: #8d8d8d;
    --text-light: #b0b0b0;
    --bg-color: #000000;
    --bg-card: #1a1a1a;
    --border-color: #333333;
    --header-bg: #000000;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-hover: #34495e;
    --hover-bg: #2a2a2a;
}

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





a {
    color: #D97D55;
}

a:visited {
    color: #D97D55;
}

a:hover {
    color: #c06844;
}

a:active {
    color: #D97D55;
}

/* ==========================================
   Header Styles
   ========================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.header-brand {
    font-size: 16px;
    font-weight: 600;
}

.header-brand a {
    color: var(--text-color);
    text-decoration: none;
}

.header-divider {
    color: var(--border-color);
}

.header-nav-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.header-nav-item a:hover {
    color: var(--primary-color);
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.header-right a:hover {
    color: var(--primary-color);
}

.header-nav {
    display: flex;
    list-style: none;
    gap: 15px;
}

.header-nav a {
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 14px;
}

.header-nav a:hover {
    background-color: var(--bg-color);
}

/* ==========================================
   Sidebar Styles
   ========================================== */

.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-collapsed-width);
    height: calc(100vh - var(--header-height));
    background-color: var(--header-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 900;
    padding: 20px 0;
    transition: width 0.3s ease;
}

.sidebar:hover {
    width: var(--sidebar-width);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu-item {
    margin-bottom: 5px;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
    font-size: 14px;
}

.sidebar-menu-link span:not(.sidebar-menu-icon) {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar:hover .sidebar-menu-link span:not(.sidebar-menu-icon) {
    opacity: 1;
}

.sidebar-menu-link:hover {
    background-color: var(--header-bg);
}

.sidebar-menu-link.active {
    background-color: var(--primary-color);
}

.sidebar-menu-icon {
    margin-right: 12px;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
    min-width: 20px;
    display: inline-flex;
    justify-content: center;
}

.sidebar-section-title {
    padding: 20px 20px 10px;
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.sidebar:hover .sidebar-section-title {
    opacity: 1;
}

/* ==========================================
   Main Content Area
   ========================================== */

.main-content {
    margin-top: var(--header-height);
    margin-left: 0;
    padding: 30px;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s ease;
    background-color: #000000;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* ==========================================
   Responsive Design
   ========================================== */

#mobile-sidebar-toggle {
    display: none;
}

.mobile-nav-item {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav-item {
        display: block;
    }
    #mobile-sidebar-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: var(--sidebar-width);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .header-left {
        gap: 10px;
    }

    .header-nav {
        display: none;
    }
}

/* ==========================================
   Utility Classes
   ========================================== */

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

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #6FA4AF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #5a8a94;
}

/* ==========================================
   Scrollbar Styling (Optional)
   ========================================== */

.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);
}

/* ==========================================
   Bootstrap-compatible Grid & Components
   ========================================== */

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

[class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 768px) {
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Card Component (already defined but adding card-header and card-body) */
.card-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-control, input[type="text"], input[type="email"], input[type="password"], textarea {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 153, 255, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Table */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    vertical-align: top;
    border-top: 1px solid var(--border-color);
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--border-color);
}

.table tbody + tbody {
    border-top: 2px solid var(--border-color);
}

/* Alerts */
.alert {
    padding: 12px 20px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

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

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

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

.text-c-red {
    color: var(--danger, #FF5370);
}

.mb-2 { margin-bottom: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.w-25 { width: 25%; }
.w-100 { width: 100%; }

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-color);
}

.btn-icon:hover {
    background-color: var(--bg-color);
    border-radius: 4px;
}

/* Progress Bar */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    background-color: #e9ecef;
    border-radius: 4px;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    text-align: center;
    background-color: var(--primary-color);
    transition: width 0.6s ease;
}

.progress-bar-label {
    font-size: 12px;
}

/* Tabs */
.nav-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.nav-item {
    margin-bottom: -1px;
}

.nav-link {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid transparent;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.nav-link:hover {
    border-color: var(--border-color) var(--border-color) transparent;
}

.nav-link.active {
    color: var(--primary-color);
    background-color: white;
    border-color: var(--border-color) var(--border-color) white;
}

.tab-content {
    padding: 20px 0;
}

.tab-pane {
    display: none;
}

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

.tab-pane.show {
    display: block;
}

/* ==========================================
   Gallery Styles
   ========================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 40px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none !important;
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.gallery-item:hover .gallery-circle {
    transform: translateY(-4px);
}

.gallery-circle-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-action-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.gallery-item-actions a:hover {
    color: var(--primary-color);
}

.new-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff3b30;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.gallery-action-link em {
    margin-right: 5px;
    color: var(--primary-color);
}

.gallery-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 20px 35px 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
    position: relative;
    overflow: visible;
    outline: none;
    box-shadow: none;
}

.gallery-circle:hover {
    background-color: var(--hover-bg);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(217, 125, 85, 0.3);
    transform: translateY(-4px);
}

.gallery-circle .text-muted {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light) !important;
    margin-bottom: 8px;
}

.gallery-circle .small {
    font-size: 11px;
    color: var(--text-color) !important;
    line-height: 1.4;
}

.gallery-circle em {
    color: var(--primary-color);
}

.gallery-circle div,
.gallery-circle span {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.gallery-item-actions {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex !important;
    gap: 12px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 12px;
}

.gallery-item-actions a {
    color: #b0b0b0 !important;
    font-size: 14px;
    transition: color 0.2s;
    text-decoration: none !important;
}

.gallery-item-actions a:hover {
    color: #D97D55 !important;
}

/* Album Grid */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.media-item {
    position: relative;
    border-radius: 4px;
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
}

.media-item > a {
    aspect-ratio: 1;
    overflow: hidden;
    display: block;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.media-item:hover img,
.media-item:hover video {
    transform: scale(1.05);
}

.media-item-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    background-color: var(--bg-card);
}

.media-item-actions a {
    color: var(--text-color);
    font-size: 16px;
    transition: color 0.2s;
}

.media-item-actions a:hover {
    color: var(--primary-color);
}

/* Filter Buttons */
.btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

.btn-outline-secondary {
    color: var(--text-color);
    border-color: var(--border-color);
    background-color: transparent;
}

.btn-outline-secondary:hover {
    color: var(--text-light);
    background-color: var(--hover-bg);
    border-color: var(--text-color);
}

.btn-primary {
    color: #000;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    color: #000;
    background-color: #c06844;
    border-color: #c06844;
}

.btn-primary.active {
    color: #000;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 125, 85, 0.2);
}

/* Statistics Page */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(217, 125, 85, 0.2);
}

.stat-card-highlight {
    border-color: var(--primary-color);
    background-color: rgba(217, 125, 85, 0.1);
}

.stat-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Guest Log Table */
.guest-log-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.guest-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.guest-log-table thead {
    background-color: rgba(217, 125, 85, 0.1);
    border-bottom: 2px solid var(--border-color);
}

.guest-log-table th {
    padding: 15px;
    text-align: left;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.guest-log-table td {
    padding: 12px 15px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.guest-log-table tbody tr {
    transition: background-color 0.2s;
}

.guest-log-table tbody tr:hover {
    background-color: var(--hover-bg);
}

.guest-log-table tbody tr:last-child td {
    border-bottom: none;
}

.guest-log-table .log-failed {
    opacity: 0.6;
}

.log-timestamp {
    font-family: 'Courier New', monospace;
    color: var(--text-light);
}

.log-guest-id {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.log-link {
    color: var(--text-color);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-country {
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.log-ip {
    font-family: 'Courier New', monospace;
    color: var(--text-color);
}

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

.status-allowed {
    color: #4ade80;
    font-weight: 500;
}

.status-allowed em {
    margin-right: 5px;
}

.status-blocked {
    color: #ff3b30;
    font-weight: 500;
}

.status-blocked em {
    margin-right: 5px;
}

.ip-filter-input {
    padding: 6px 12px;
    font-size: 12px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-light);
    min-width: 200px;
    transition: all 0.2s;
}

.ip-filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(217, 125, 85, 0.2);
}

.ip-filter-input::placeholder {
    color: var(--text-color);
    opacity: 0.6;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding: 30px 0;
    text-align: center;
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
    font-size: 12px;
}

.footer em {
    color: var(--primary-color);
    margin-right: 8px;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}
