/* Admin Panel Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.admin-sidebar {
    width: 200px;
    background-color: #23282d;
    color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 0;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.admin-sidebar.collapsed {
    width: 60px;
}

.admin-sidebar .logo {
    text-align: center;
    padding: 16px;
    border-bottom: 1px solid #32373c;
    background-color: #23282d;
}

.admin-sidebar.collapsed .logo {
    padding: 16px 8px;
}

.admin-sidebar .logo h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.admin-sidebar.collapsed .logo h3 {
    display: none;
}

.admin-sidebar .nav {
    list-style: none;
    padding: 8px 0;
    margin: 0;
    display: block;
}

.admin-sidebar .nav li {
    margin: 0;
    display: block;
    width: 100%;
}

.admin-sidebar .nav a {
    display: block;
    padding: 12px 16px;
    color: #b4b9be;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.admin-sidebar.collapsed .nav a {
    text-align: center;
    padding: 12px 16px;
}

.admin-sidebar .nav a:hover,
.admin-sidebar .nav a.active {
    background-color: #32373c;
    color: #fff;
    border-left-color: #00a0d2;
}

.admin-sidebar .nav a i {
    margin-right: 12px;
    width: 18px;
    font-size: 16px;
}

.admin-sidebar.collapsed .nav a i {
    margin-right: 0;
}

.admin-sidebar .nav a span {
    display: inline;
}

.admin-sidebar.collapsed .nav a span {
    display: none;
}

.admin-content {
    margin-left: 200px;
    padding: 20px;
}

.admin-header {
    background-color: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    color: #343a40;
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: #c82333;
    color: white;
    text-decoration: none;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card h3 {
    margin: 0 0 10px 0;
    color: #343a40;
}

.card p {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
}

/* Tables */
.table-responsive {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table {
    margin: 0;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Forms */
.form-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #343a40;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
}

/* Add Post Layout Adjustments */
.admin-content {
    margin-left: 200px;
    padding: 20px;
    font-size: 13px;
}

.admin-content .card-body {
    font-size: 13px;
}

.admin-content .form-label {
    font-size: 13px;
    margin-bottom: 4px;
}

.admin-content .form-control {
    font-size: 13px;
    padding: 6px 10px;
}

.admin-content .btn {
    font-size: 13px;
    padding: 6px 12px;
}

.admin-content .card-header h5 {
    font-size: 14px;
}

/* Adjust column widths for better content space */
.col-lg-8 {
    flex: 0 0 auto;
    width: 75%;
}

.col-lg-4 {
    flex: 0 0 auto;
    width: 25%;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-form {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 16px;
    left: 16px;
    background-color: #23282d;
    color: #b4b9be;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    display: none;
}

.sidebar-toggle:hover {
    background-color: #32373c;
    color: #fff;
}

.sidebar-toggle i {
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        width: 250px;
        z-index: 1000;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
    }

    .admin-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .admin-content.collapsed {
        margin-left: 60px;
    }
}

/* Password Input Styles */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container .form-control {
    padding-right: 40px; /* Space for the button */
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #495057;
}

.password-toggle i {
    font-size: 14px;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 20px;
}
.gallery-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    transition: transform 0.2s;
}
.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.gallery-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}
.gallery-item-info {
    padding: 6px;
    font-size: 11px;
    color: #666;
}
.gallery-item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gallery-item-size {
    margin-bottom: 3px;
}
.gallery-item-actions {
    position: absolute;
    top: 3px;
    right: 3px;
    opacity: 0;
    transition: opacity 0.2s;
}
.gallery-item:hover .gallery-item-actions {
    opacity: 1;
}
.delete-btn {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
}
.delete-btn:hover {
    background: rgba(220, 53, 69, 1);
}
.stats {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
}
.stats h5 {
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}
.stat-item {
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}
.stat-number {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
}
.stat-label {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}
