/* Admin Panel Styles */

.admin-login {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-container h2 {
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1.8rem;
}

.login-container p {
    color: #6b7280;
    margin-bottom: 2rem;
}

.login-container input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-container button:hover {
    background: #1d4ed8;
}

.login-hint {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #9ca3af;
}

.login-hint code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    color: #1f2937;
}

/* Admin Panel Layout */
.admin-panel {
    min-height: 100vh;
    background: #f8fafc;
}

.admin-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav h1 {
    color: #1f2937;
    font-size: 1.5rem;
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

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

/* Admin Content Layout */
.admin-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 2rem 0;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.menu-item {
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.menu-item.active {
    background: #2563eb;
    color: white;
}

.admin-main {
    flex: 1;
    padding: 2rem;
}

/* Admin Sections */
.admin-section {
    display: none;
}

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

.admin-section h2 {
    margin-bottom: 2rem;
    color: #1f2937;
    font-size: 1.8rem;
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-weight: 500;
}

.recent-activity {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.recent-activity h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.activity-time {
    font-size: 0.9rem;
    color: #9ca3af;
    min-width: 100px;
}

.activity-desc {
    flex: 1;
    color: #4b5563;
}

/* Edit Forms */
.edit-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    max-width: 800px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
}

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

.mb-3 {
    margin-bottom: 1.5rem;
}

/* Content List */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.content-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.content-info h4 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.content-info p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.content-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* File Manager */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    background: white;
}

.upload-area:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.file-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.file-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.file-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.file-size {
    color: #6b7280;
    font-size: 0.85rem;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.close:hover {
    color: #1f2937;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Success/Error Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Contact Info Grid */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-info-grid .form-group {
    display: flex;
    flex-direction: column;
}

.contact-info-grid label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.contact-info-grid input,
.contact-info-grid select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.contact-info-grid input:focus,
.contact-info-grid select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-content {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        padding: 1rem 0;
    }
    
    .admin-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 1rem;
    }
    
    .menu-item {
        white-space: nowrap;
        min-width: auto;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-nav {
        padding: 0 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .admin-actions {
        order: -1;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .login-container {
        padding: 2rem 1.5rem;
    }
    
    .content-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .admin-nav h1 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .content-list {
        padding: 0.5rem;
    }
    
    .content-actions {
        justify-content: flex-start;
        margin-top: 1rem;
    }
}

/* Service Inquiries Styles */
.inquiries-container {
    padding: 1rem 0;
}

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

.inquiries-list {
    display: grid;
    gap: 1.5rem;
}

.inquiry-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.inquiry-card:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.inquiry-card.handled {
    background: #f0f9ff;
    border-color: #10b981;
}

.inquiry-card.handled::after {
    content: "✓ Handled";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.inquiry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.inquiry-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.25rem;
}

.inquiry-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.inquiry-date {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
}

.inquiry-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.detail-row strong {
    min-width: 80px;
    color: #1f2937;
    font-weight: 600;
}

.service-tag {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.inquiry-description {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid #2563eb;
    font-style: italic;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.inquiry-footer {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

.no-content {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.no-content p:first-child {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Responsive Design for Inquiries */
@media (max-width: 768px) {
    .inquiry-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .inquiry-actions {
        flex-direction: row;
        align-items: center;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .detail-row strong {
        min-width: auto;
    }
    
    .inquiry-footer {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

/* Newsletter Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Mini stats for newsletter dashboard */
.mini-stat {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.mini-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 0.25rem;
}

.mini-stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Button styles for newsletter actions */
.btn-outline {
    background: transparent;
    border: 2px solid #d1d5db;
    color: #6b7280;
}

.btn-outline:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-success {
    background: #10b981;
    color: white;
}

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