/* Dargo Support CMS Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background-color: #faf9f7;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --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);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo svg {
    flex-shrink: 0;
}

.login-button {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.login-button:hover {
    background: var(--primary-hover);
    color: white;
}

/* User Menu */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-info {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-info:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.user-dropdown a:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

.user-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.user-dropdown a:last-child {
    border-radius: 0 0 8px 8px;
    border-top: 1px solid var(--border-color);
}

/* Main container */
main {
    flex: 1;
}

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

/* Search section */
.search-section {
    background: var(--card-background);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.search-button:hover {
    background: var(--primary-hover);
}



/* Search results section */
.search-results {
    max-width: 600px;
    margin: 2rem auto 0;
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: none;
    text-align: left;
}

.search-results.show {
    display: block;
}

.search-result {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-result:last-child {
    border-bottom: none;
}

.search-result h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.search-result h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.search-result h3 a:hover {
    color: var(--primary-color);
}

.result-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.result-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.result-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

.search-error {
    padding: 1.5rem;
    color: var(--danger-color);
    text-align: center;
}

/* Category page spacing */
.category-page {
    padding-top: 3rem;
}

/* Categories section */
.categories-section {
    padding: 3rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* Removed hover effect to keep cards static */

.category-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.category-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.posts-list {
    list-style: none;
}

.post-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.post-item:last-child {
    border-bottom: none;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: var(--text-primary);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    background: var(--background-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Post detail page */
.post-header {
    background: var(--card-background);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.post-content {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.post-content h1:first-child,
.post-content h2:first-child,
.post-content h3:first-child,
.post-content h4:first-child,
.post-content h5:first-child,
.post-content h6:first-child {
    margin-top: 0;
}

.post-content h1 { font-size: 2rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; }
.post-content h2 { font-size: 1.75rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.25rem; }
.post-content h5 { font-size: 1.125rem; }
.post-content h6 { font-size: 1rem; color: var(--text-secondary); }

.post-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.post-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.post-content em {
    font-style: italic;
}

.post-content img,
.post-content .markdown-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.post-content code {
    background: var(--background-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.post-content pre {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.post-content pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 0.875rem;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--background-color);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content ul li,
.post-content ol li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    padding-left: 0.5rem;
}

.post-content ul li::marker {
    color: var(--primary-color);
    font-size: 1.2em;
}

.post-content ol li::marker {
    color: var(--primary-color);
    font-weight: 600;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--primary-hover);
}

.post-content hr {
    border: none;
    height: 2px;
    background: var(--border-color);
    margin: 2rem 0;
    border-radius: 1px;
}

.post-content .markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.post-content .markdown-table th,
.post-content .markdown-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.post-content .markdown-table th {
    background: var(--background-color);
    color: var(--text-primary);
    font-weight: 600;
}

.post-content .markdown-table tr:nth-child(even) {
    background: var(--background-color);
}

.post-content .markdown-table tr:hover {
    background: var(--primary-color);
    color: white;
}

.post-content .markdown-table tr:hover td {
    color: white;
}

/* Admin styles */
.admin-header {
    background: var(--card-background);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.admin-main-nav {
    margin-bottom: 1rem;
}

.admin-main-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.admin-main-tab {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.admin-main-tab:hover {
    color: var(--primary-color);
    background: var(--background-color);
}

.admin-main-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-sub-nav {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-sub-nav a {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.admin-sub-nav a:hover,
.admin-sub-nav a.active {
    background: var(--primary-color);
    color: white;
}

.admin-content {
    padding: 2rem 0;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.form-checkbox {
    margin-right: 0.5rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
}

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

.button-secondary {
    background: var(--secondary-color);
}

.button-secondary:hover {
    background: #475569;
}

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

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

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

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

/* Editor styles */
.editor-container {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.editor-toolbar {
    background: var(--background-color);
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.editor-button {
    padding: 0.5rem;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.editor-button:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.editor-button.active {
    background: var(--primary-color);
    color: white;
}

.editor-content {
    display: flex;
    min-height: 400px;
}

.editor-pane {
    flex: 1;
    padding: 1rem;
}

.editor-textarea {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    resize: none;
    background: transparent;
}

.editor-preview {
    flex: 1;
    border-left: 1px solid var(--border-color);
    background: var(--card-background);
    overflow-y: auto;
    padding: 1rem;
}

.preview-content {
    max-width: 100%;
    line-height: 1.7;
    color: var(--text-primary);
}

/* Markdown content styling */
.preview-content h1,
.preview-content h2,
.preview-content h3,
.preview-content h4,
.preview-content h5,
.preview-content h6 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.preview-content h1:first-child,
.preview-content h2:first-child,
.preview-content h3:first-child,
.preview-content h4:first-child,
.preview-content h5:first-child,
.preview-content h6:first-child {
    margin-top: 0;
}

.preview-content h1 { font-size: 2rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; }
.preview-content h2 { font-size: 1.75rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3rem; }
.preview-content h3 { font-size: 1.5rem; }
.preview-content h4 { font-size: 1.25rem; }
.preview-content h5 { font-size: 1.125rem; }
.preview-content h6 { font-size: 1rem; color: var(--text-secondary); }

.preview-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.preview-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.preview-content em {
    font-style: italic;
}

.preview-content code {
    background: var(--background-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.preview-content pre {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.preview-content pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 0.875rem;
}

.preview-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--background-color);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.preview-content ul,
.preview-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.preview-content ul {
    list-style-type: disc;
}

.preview-content ol {
    list-style-type: decimal;
}

.preview-content ul li,
.preview-content ol li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    padding-left: 0.5rem;
}

.preview-content ul li::marker {
    color: var(--primary-color);
    font-size: 1.2em;
}

.preview-content ol li::marker {
    color: var(--primary-color);
    font-weight: 600;
}

.preview-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.preview-content a:hover {
    color: var(--primary-hover);
}

.preview-content img,
.preview-content .markdown-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.preview-content hr {
    border: none;
    height: 2px;
    background: var(--border-color);
    margin: 2rem 0;
    border-radius: 1px;
}

.preview-content .markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.preview-content .markdown-table th,
.preview-content .markdown-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.preview-content .markdown-table th {
    background: var(--background-color);
    color: var(--text-primary);
    font-weight: 600;
}

.preview-content .markdown-table tr:nth-child(even) {
    background: var(--background-color);
}

.preview-content .markdown-table tr:hover {
    background: var(--primary-color);
    color: white;
}

.preview-content .markdown-table tr:hover td {
    color: white;
}

.editor-divider {
    width: 2px;
    background: var(--border-color);
    cursor: col-resize;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .login-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .search-section {
        padding: 2rem 0;
    }

    .search-section h1 {
        font-size: 1.75rem;
    }

    .search-section p {
        font-size: 0.9rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .editor-content {
        flex-direction: column;
    }

    .editor-preview {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .search-results {
        margin: 1rem auto 0;
        border-radius: 4px;
    }
    
    .search-result {
        padding: 1rem;
    }
}

/* Support options styles */
.support-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.support-option {
    /* No transitions or hover effects */
}

.support-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    text-decoration: none;
    color: var(--text-primary);
}

.support-link.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.support-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.support-text {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.email-icon {
    color: var(--primary-color);
}

.ticket-icon {
    color: var(--primary-color);
}



/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.footer-left {
    text-align: left;
}

.footer-brand {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
}

.footer-brand svg {
    flex-shrink: 0;
}

.footer-slogan {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.4;
}

.footer-center {
    display: flex;
    justify-content: center;
}

.footer-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-section h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-right {
    text-align: right;
}

.footer-copyright {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-copyright svg {
    opacity: 0.7;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-left {
        text-align: center;
    }
    
    .footer-menu {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-right {
        text-align: center;
    }
    
    .footer-copyright {
        justify-content: center;
    }
}

/* Coming soon page */
.coming-soon {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 2rem auto;
    max-width: 600px;
}

.coming-soon h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.coming-soon p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.search-modal.show {
    display: flex;
}

.search-modal-content {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    margin-top: 5rem;
}

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

.search-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.search-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.search-modal-close:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.search-modal-body {
    padding: 0;
}

.search-modal .search-result {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-modal .search-result:last-child {
    border-bottom: none;
}

.search-modal .no-results {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

.search-modal .search-error {
    padding: 2rem;
    color: var(--danger-color);
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .search-modal {
        padding: 1rem;
    }
    
    .search-modal-content {
        margin-top: 2rem;
        max-height: 85vh;
    }
    
    .search-modal-header {
        padding: 1rem;
    }
    
    .search-modal .search-result {
        padding: 1rem;
    }
}

/* Keep original search results section but hide it when using modal */
.search-results {
    max-width: 600px;
    margin: 2rem auto 0;
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: none;
    text-align: left;
}

/* Admin Interface Styles */
.posts-admin {
    margin-top: 2rem;
}

.post-admin-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.post-admin-info {
    flex: 1;
}

.post-admin-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.post-admin-info .post-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.post-admin-info .post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.post-admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.post-view-action {
    margin-left: 0.5rem;
}

.post-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--background-color);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.post-view-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.post-view-link svg {
    width: 16px;
    height: 16px;
}

.button-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

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

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

.button-secondary {
    background: var(--text-muted);
    color: white;
}

.button-secondary:hover {
    background: var(--text-secondary);
}

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

.button-danger:hover {
    background: #c53030;
}

.status-published {
    color: var(--success-color);
    font-weight: 500;
}

.status-draft {
    color: var(--text-muted);
    font-weight: 500;
}

.admin-items {
    margin-top: 2rem;
}

.admin-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.admin-item-info {
    flex: 1;
}

.admin-item-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.admin-item-info p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
}

.admin-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.form-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.form-popup-content {
    background: var(--card-background);
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.form-popup-content h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
}

/* Mobile responsive for admin */
@media (max-width: 768px) {
    .post-admin-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-admin-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .post-view-action {
        margin-left: 0;
    }
    
    .admin-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-item-actions {
        justify-content: flex-start;
    }
    
    .admin-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Support Ticket System */
.support-login {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-card {
    background: var(--card-background);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header svg {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-header h1 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 700;
}

.login-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.login-form {
    margin-bottom: 2rem;
}

.login-note {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.login-note p {
    margin: 0 0 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.login-note p:last-child {
    margin-bottom: 0;
}

.login-note strong {
    color: var(--primary-color);
}

.button-full {
    width: 100%;
    justify-content: center;
}

/* Support Dashboard */
.support-dashboard {
    padding: 2rem 0;
}

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

.dashboard-header h1 {
    margin: 0;
    color: var(--text-color);
}

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

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

.ticket-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.ticket-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ticket-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.ticket-info h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.ticket-info h3 a:hover {
    color: var(--primary-color);
}

.ticket-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.ticket-status,
.ticket-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-status.status-open {
    background: #e6f3ff;
    color: #0066cc;
}

.ticket-status.status-awaiting-user {
    background: #fff3cd;
    color: #856404;
}

.ticket-status.status-awaiting-support {
    background: #f8d7da;
    color: #721c24;
}

.ticket-status.status-resolved {
    background: #d1e7dd;
    color: #0a3622;
}

.ticket-status.status-closed {
    background: #f8f9fa;
    color: #6c757d;
}

.ticket-priority.priority-low {
    background: #e2e8f0;
    color: #4a5568;
}

.ticket-priority.priority-normal {
    background: #bee3f8;
    color: #2c5282;
}

.ticket-priority.priority-high {
    background: #fed7d7;
    color: #c53030;
}

.ticket-priority.priority-urgent {
    background: #fbb6ce;
    color: #97266d;
}

.ticket-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Ticket Detail */
.ticket-detail {
    padding: 2rem 0;
}

.ticket-breadcrumb {
    margin-bottom: 1rem;
}

.ticket-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.ticket-breadcrumb a:hover {
    text-decoration: underline;
}

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

.ticket-header-detail h1 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
}

.ticket-meta-detail {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.ticket-conversation {
    margin-bottom: 2rem;
}

.message {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.message.staff {
    background: #f8f9ff;
    border-color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.message.user {
    background: var(--card-background);
    border-left: 4px solid #22c55e;
}

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

.message-header strong {
    color: var(--text-color);
}

.message-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.message-content {
    color: var(--text-color);
    line-height: 1.6;
    white-space: pre-wrap;
}

.ticket-reply {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.ticket-reply h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
}

.ticket-resolved-notice {
    background: var(--card-background);
    border: 1px solid var(--success-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.resolved-notice-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.resolved-notice-content svg {
    color: var(--success-color);
    background: var(--success-color);
    background: rgba(34, 197, 94, 0.1);
    padding: 1rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.resolved-notice-content h3 {
    margin: 0;
    color: var(--success-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.resolved-notice-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 500px;
}

/* Support Ticket Mobile Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .dashboard-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .ticket-meta,
    .ticket-meta-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .login-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Dashboard Tabs */
.dashboard-tabs {
    margin-bottom: 2rem;
}

.tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

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

/* Resolve Button */
.ticket-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.resolve-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resolve-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.resolve-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.resolve-btn svg {
    width: 16px;
    height: 16px;
}

/* Admin Specific Styles */
.admin-tickets .ticket-user {
    background: #e0f2fe;
    color: #01579b;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .tabs-nav {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .ticket-actions {
        justify-content: center;
    }
    
    .admin-main-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .admin-main-tab {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    	.admin-sub-nav {
		flex-wrap: wrap;
		gap: 0.5rem;
	}
}

/* Legal Pages Styles */
.legal-page {
	padding: 2rem 0;
	max-width: 900px;
	margin: 0 auto;
}

.legal-header {
	background: var(--card-background);
	padding: 3rem 2rem;
	border-radius: 12px;
	box-shadow: var(--shadow);
	margin-bottom: 2rem;
	text-align: center;
	border-bottom: 3px solid var(--primary-color);
}

.legal-header h1 {
	font-size: 2.5rem;
	color: var(--text-primary);
	margin-bottom: 1rem;
}

.legal-dates {
	font-size: 1rem;
	color: var(--text-secondary);
	line-height: 1.6;
}

.legal-content {
	background: var(--card-background);
	padding: 3rem 2rem;
	border-radius: 12px;
	box-shadow: var(--shadow);
	line-height: 1.7;
}

.legal-section {
	margin-bottom: 3rem;
}

.legal-section:last-child {
	margin-bottom: 0;
}

.legal-section h2 {
	color: var(--primary-color);
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--background-color);
}

.legal-section h3 {
	color: var(--text-primary);
	font-size: 1.25rem;
	margin-bottom: 1rem;
	margin-top: 1.5rem;
}

.legal-section p {
	color: var(--text-secondary);
	margin-bottom: 1rem;
}

.legal-section ul {
	margin-bottom: 1rem;
	padding-left: 1.5rem;
}

.legal-section ul li {
	margin-bottom: 0.5rem;
	color: var(--text-secondary);
}

.legal-section ul li strong {
	color: var(--text-primary);
}

.legal-section a {
	color: var(--primary-color);
	text-decoration: underline;
}

.legal-section a:hover {
	color: var(--primary-hover);
}

.legal-footer {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid var(--background-color);
	text-align: center;
}

.legal-footer p {
	color: var(--text-secondary);
	font-size: 0.95rem;
	margin-bottom: 0.5rem;
}

.legal-footer em {
	font-style: italic;
	color: var(--text-muted);
}

/* Mobile responsive styles for legal pages */
@media (max-width: 768px) {
	.legal-page {
		padding: 1rem;
	}

	.legal-header {
		padding: 2rem 1.5rem;
	}

	.legal-header h1 {
		font-size: 2rem;
	}

	.legal-content {
		padding: 2rem 1.5rem;
	}

	.legal-section {
		margin-bottom: 2rem;
	}

	.legal-section h2 {
		font-size: 1.5rem;
	}

	.legal-section h3 {
		font-size: 1.1rem;
	}

	.legal-section ul {
		padding-left: 1rem;
	}
}