/* Premium Admin Dashboard Theme */
:root {
    /* Brand Colors */
    --primary: #344A9D;
    --primary-dark: #2a3a7f;
    --primary-light: #eef2ff;
    --accent: #6366f1;

    /* Neutral Colors */
    --bg-body: #f1f5f9;
    --bg-sidebar: #1e293b;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;

    /* Status Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Shadows & Radius */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

/* --- Layout --- */
.dashboard-container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* Sidebar (Off-Canvas) */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    /* Hidden by default */
    bottom: 0;
    width: 280px;
    background-color: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
}

.sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
    height: 32px;
    margin-right: 12px;
}

.sidebar-header span {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 4px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item.logout {
    color: #ef4444;
}

.nav-item.logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-body);
    width: 100%;
    /* Full width */
}

/* Top Bar */
.top-bar {
    height: 70px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    box-shadow: var(--shadow-sm);
}

.flex-align {
    display: flex;
    align-items: center;
    gap: 16px;
}

.burger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.burger-btn:hover {
    background: #f1f5f9;
}

.page-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.page-title p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-info .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info .role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 24px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.row {
    display: flex;
    gap: 20px;
}

.col {
    flex: 1;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-outline,
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--text-muted);
}

.btn-danger {
    background: #fee2e2;
    color: var(--danger);
}

.btn-danger:hover {
    background: #fecaca;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-zone i {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.upload-zone.small {
    padding: 16px;
}

.upload-zone.small i {
    font-size: 1.5rem;
}

/* Grids */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.stats-grid-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.items-list-modern {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.partners-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

/* Gallery Card Modern */
.gallery-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.2s;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-card-header {
    padding: 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-card-body {
    padding: 16px;
}

/* Login Screen */
#loginScreen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    /* Ensure it's above everything */
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    height: 48px;
    margin-bottom: 16px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.input-group input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.btn-login {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 12px;
    font-size: 1rem;
    justify-content: space-between;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none !important;
    /* Force hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1;
}

.modal-card {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-light);
    cursor: pointer;
}

.close-btn:hover {
    color: var(--danger);
}

/* Utilities */
.hidden {
    display: none !important;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.full-width {
    width: 100%;
}

/* Preview Grid */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.preview-grid.mini {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
}

/* Upload Progress Bar */
.upload-progress {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.upload-progress.hidden {
    display: none;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 500;
}

.progress-label {
    color: #333;
    font-size: 0.95rem;
}

.progress-percentage {
    color: #2563eb;
    font-size: 1.1em;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 12px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-details {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

.progress-bar-fill.complete {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-bar-fill.error {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.preview-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.preview-item.dragging {
    opacity: 0.3;
    border: 2px dashed var(--primary);
    cursor: grabbing;
    transform: scale(0.95);
}

.preview-item.drag-over {
    border-color: var(--primary);
    transform: scale(1.02);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 1;
    /* Made always visible */
    transform: scale(0.9);
    /* Slightly smaller default state */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
    /* Ensure on top of video/image */
}

.preview-item:hover .remove-btn {
    opacity: 1;
    transform: scale(1.1);
    /* Enlarge on hover */
}

.remove-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.remove-btn:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar {
        padding: 0 16px;
    }

    .content-wrapper {
        padding: 16px;
    }
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Project Cards */
.project-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.project-image {
    height: 200px;
    width: 100%;
    position: relative;
    background: #f8fafc;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
    background: #f1f5f9;
}

.project-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    background: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-commercial {
    background: #6366f1;
}

.badge-residential {
    background: #10b981;
}

.badge-industrial {
    background: #f59e0b;
}

.badge-retail {
    background: #ec4899;
}

.project-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

.project-year {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.project-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.detail-item i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.project-actions {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.btn-icon-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: white;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-text:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-light);
}

.btn-icon-text.text-danger:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fee2e2;
}

/* Partners Grid */
.partners-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.partner-item-admin {
    position: relative;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    /* Fixed height for consistency */
    transition: all 0.2s ease;
}

.partner-item-admin:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.partner-item-admin img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
    /* Ensure image doesn't overflow */
    max-width: 100%;
}

.partner-item-admin p {
    margin: 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-item-admin .btn-danger {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
    background: #f1f5f9;
}

.project-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    background: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-commercial {
    background: #6366f1;
}

.badge-residential {
    background: #10b981;
}

.badge-industrial {
    background: #f59e0b;
}

.badge-retail {
    background: #ec4899;
}

.project-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

.project-year {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.project-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.detail-item i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.project-actions {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.btn-icon-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: white;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-text:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-light);
}

.btn-icon-text.text-danger:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fee2e2;
}

/* Partners Grid */
.partners-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.partner-item-admin {
    position: relative;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    /* Fixed height for consistency */
    transition: all 0.2s ease;
}

.partner-item-admin:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.partner-item-admin img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
    /* Ensure image doesn't overflow */
    max-width: 100%;
}

.partner-item-admin p {
    margin: 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-item-admin .btn-danger {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 12px;
}

.partner-item-admin:hover .btn-danger {
    opacity: 1;
}

/* Action Bar & Search */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    background: white;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Ensure buttons in action bar align well */
.action-bar .btn-danger,
.action-bar .btn-primary {
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

/* Gallery Card Styles */
.gallery-card-header {
    padding: 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gallery-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.gallery-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.info-item i {
    width: 16px;
    text-align: center;
    color: var(--primary);
}

.gallery-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.link-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.link-wrapper i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.gallery-link-input {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: var(--text-main);
    width: 100%;
    outline: none;
    font-family: monospace;
}

.btn-icon {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-light);
}

.gallery-card-footer {
    max-width: 100%;
}

.partner-item-admin p {
    margin: 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-item-admin .btn-danger {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 12px;
}

.partner-item-admin:hover .btn-danger {
    opacity: 1;
}

/* Action Bar & Search */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    background: white;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Ensure buttons in action bar align well */
.action-bar .btn-danger,
.action-bar .btn-primary {
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

/* Gallery Card Styles */
.gallery-card-header {
    padding: 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gallery-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.gallery-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.info-item i {
    width: 16px;
    text-align: center;
    color: var(--primary);
}

.gallery-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.link-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.link-wrapper i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.gallery-link-input {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: var(--text-main);
    width: 100%;
    outline: none;
    font-family: monospace;
}

.btn-icon {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-light);
}

.gallery-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: white;
    display: flex;
    gap: 12px;
}