/* Admin Styles */
:root {
    --primary: #006837;
    --primary-dark: #004d2b;
    --primary-light: #00a651;
    --secondary: #008542;
    --accent: #f97316;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --background: #ffffff;
    --surface: #f9fafb;
    --surface-2: #f3f4f6;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    
    --text: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
.admin-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-title {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.5rem;
    font-size: 0.75rem;
}

/* Layout */
.admin-main {
    padding: 2rem 0;
}

.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Sidebar */
.admin-sidebar {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    position: sticky;
    top: 120px;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--primary);
    color: white;
}

.sidebar-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

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

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
}

.sidebar-link:hover {
    background: var(--border-light);
    color: var(--text);
}

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

.sidebar-link i {
    width: 16px;
    text-align: center;
}

/* Content Sections */
.admin-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.content-section {
    display: none;
    padding: 2rem;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-title {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.subsection {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.subsection-title {
    color: var(--primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
}

.form-input,
.form-select,
.form-textarea {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 104, 55, 0.1);
}

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

.form-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.form-row .form-input {
    flex: 1;
}

/* Link Management */
.nav-link-item,
.quick-link-item,
.delivery-link-item,
.contact-link-item {
    padding: 1rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* Toast Notifications */
#toastContainer {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transform: translateX(-120%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-info {
    background: var(--info);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 2rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    color: var(--primary);
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border-light);
    color: var(--text);
}

.modal-body {
    flex: 1;
    padding: 0;
}

#previewFrame {
    width: 100%;
    height: 70vh;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .admin-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .admin-sidebar {
        position: static;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        justify-content: center;
    }
    
    #toastContainer {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
    
    .modal {
        padding: 1rem;
    }
    
    #previewFrame {
        height: 50vh;
    }
}

@media (max-width: 480px) {
    .admin-title {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .sidebar-link {
        padding: 0.75rem 1rem;
    }
    
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    #previewFrame {
        height: 60vh;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}
/* Hamiz.net Header & Sidebar Styles */
:root {
    --hamiz-primary: #006837;
    --hamiz-secondary: #008542;
    --hamiz-background: #ffffff;
    --hamiz-text: #1f2937;
    --hamiz-border: #e5e7eb;
    --hamiz-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --hamiz-header-height: 70px;
}

[data-theme="dark"] {
    --hamiz-primary: #008542;
    --hamiz-secondary: #00a651;
    --hamiz-background: #1f2937;
    --hamiz-text: #f3f4f6;
    --hamiz-border: #374151;
    --hamiz-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.hamiz-header {
    background-color: var(--hamiz-primary);
    padding: 0.5rem 0;
    box-shadow: var(--hamiz-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--hamiz-header-height);
}

.hamiz-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.hamiz-header-content > div {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hamiz-header-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0px;
    text-align: center;
    font-family: 'Cairo', sans-serif;
}

.hamiz-logo {
    display: flex;
    align-items: center;
}

.hamiz-logo img {
    height: 50px;
    width: auto;
}

@media (max-width: 768px) {
    .hamiz-header-title {
        font-size: 1rem;
    }
}

.hamiz-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamiz-side-menu {
    position: fixed;
    right: -100%;
    top: 0;
    width: 300px;
    height: 100vh;
    background-color: var(--hamiz-background);
    box-shadow: var(--hamiz-shadow);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    padding: calc(var(--hamiz-header-height) + 1rem) 1rem 1rem 1rem;
}

.hamiz-side-menu.active {
    right: 0;
}

.hamiz-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hamiz-border);
}

.hamiz-menu-items {
    list-style: none;
}

.hamiz-menu-item {
    margin-bottom: 1rem;
}

.hamiz-menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    color: var(--hamiz-text);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.hamiz-menu-link:hover, .hamiz-menu-link.active {
    background-color: #f59e0b;
    color: white;
    transform: translateX(-5px);
}

.hamiz-menu-link:hover {
    background-color: var(--hamiz-border);
}

.hamiz-menu-link i {
    margin-left: 0.75rem;
    width: 20px;
    text-align: center;
}

.hamiz-submenu {
    list-style: none;
    margin-right: 2rem;
    margin-top: 0.5rem;
    display: none;
}

.hamiz-submenu.active {
    display: block;
}

.hamiz-menu-close {
    background: var(--hamiz-primary);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hamiz-menu-close:hover {
    background-color: var(--hamiz-secondary);
    transform: scale(1.1);
}

.hamiz-menu-header h3 {
    margin-bottom: 10px;
}

/* Notification */
.hamiz-notification {
    position: fixed;
    top: calc(var(--hamiz-header-height) + 20px);
    right: 20px;
    padding: 1rem;
    background-color: var(--hamiz-primary);
    color: white;
    border-radius: 0.5rem;
    box-shadow: var(--hamiz-shadow);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hamiz-notification.show {
    transform: translateX(0);
}

/* Adjust body padding */
body {
    padding-top: var(--hamiz-header-height);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    :root {
        --hamiz-header-height: 60px;
    }
    
    .hamiz-side-menu {
        width: 85%;
        max-width: 300px;
    }
}
.admin-badge {
    background: #f59e0b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 1rem;
    animation: pulse 2s infinite;
}
