
/* ==========================================
   IP MANAGER
   Modern Dashboard Design
   PHP 7 compatible project
   ========================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;

    --background: #f5f7fb;
    --surface: #ffffff;

    --text: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    --border: #e5e7eb;

    --sidebar-width: 260px;

    --radius: 14px;

    --shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
/* ==========================================
   DARK THEME
   ========================================== */

html[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #172554;

    --background: #0f172a;
    --surface: #111827;

    --text: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --border: #263244;

    --shadow:
        0 4px 20px
        rgba(0, 0, 0, 0.25);
}

/* ==========================================
   RESET
   ========================================== */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--background);

    color: var(--text);

    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;

    text-decoration: none;
}

button,
input {
    font-family: inherit;
}


/* ==========================================
   APP LAYOUT
   ========================================== */

.app-layout {
    display: flex;

    min-height: 100vh;
}


/* ==========================================
   SIDEBAR
   ========================================== */

.sidebar {
    width: var(--sidebar-width);

    flex-shrink: 0;

    display: flex;

    flex-direction: column;

    background: var(--surface);

    border-right: 1px solid var(--border);

    position: fixed;

    top: 0;
    bottom: 0;
    left: 0;

    z-index: 100;
}

.sidebar-brand {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 26px 22px;

    border-bottom: 1px solid var(--border);
}

.brand-icon {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: var(--primary);

    color: white;

    border-radius: 12px;

    font-weight: 800;

    font-size: 16px;
}

.brand-text {
    display: flex;

    flex-direction: column;

    gap: 3px;
}

.brand-text strong {
    font-size: 16px;
}

.brand-text span {
    font-size: 11px;

    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;

    padding: 24px 14px;

    overflow-y: auto;
}

.nav-section-title {
    padding: 0 12px;

    margin: 20px 0 9px;

    color: var(--text-muted);

    font-size: 10px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.08em;
}

.nav-section-title:first-child {
    margin-top: 0;
}

.nav-link {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    margin-bottom: 4px;

    border-radius: 9px;

    color: var(--text-secondary);

    font-size: 13px;

    font-weight: 500;

    transition:
        background 0.2s,
        color 0.2s;
}

.nav-link:hover {
    background: var(--background);

    color: var(--text);
}

.nav-link.active {
    background: var(--primary-light);

    color: var(--primary);

    font-weight: 600;
}

.nav-icon {
    width: 22px;

    text-align: center;

    font-size: 18px;
}

.sidebar-bottom {
    padding: 18px;

    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 15px;
}

.avatar {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: #dbeafe;

    color: #1d4ed8;

    border-radius: 50%;

    font-weight: 700;

    font-size: 14px;
}

.sidebar-user-info {
    display: flex;

    flex-direction: column;

    gap: 4px;

    min-width: 0;
}

.sidebar-user-info strong {
    font-size: 13px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.sidebar-user-info span {
    color: var(--text-muted);

    font-size: 11px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.logout-link {
    display: block;

    padding: 10px 12px;

    color: #dc2626;

    font-size: 13px;

    border-radius: 8px;
}

.logout-link:hover {
    background: #fef2f2;
}


/* ==========================================
   MAIN AREA
   ========================================== */

.main-area {
    flex: 1;

    min-width: 0;

    margin-left: var(--sidebar-width);

    display: flex;

    flex-direction: column;

    min-height: 100vh;
}

.topbar {
    height: 78px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 36px;

    background: var(--surface);

    border-bottom: 1px solid var(--border);
}

.topbar-title {
    display: flex;

    flex-direction: column;

    gap: 5px;
}

.topbar-label {
    font-size: 11px;

    color: var(--text-muted);
}

.topbar-title strong {
    font-size: 14px;
}

.topbar-right {
    display: flex;

    align-items: center;

    gap: 8px;

    color: var(--text-secondary);

    font-size: 12px;
}

.online-indicator {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #22c55e;
}

.mobile-menu-button {
    display: none;

    border: none;

    background: transparent;

    font-size: 24px;

    cursor: pointer;
}


/* ==========================================
   PAGE
   ========================================== */

.page-content {
    flex: 1;

    width: 100%;

    max-width: 1440px;

    margin: 0 auto;

    padding: 36px;
}

.page-heading {
    margin-bottom: 28px;
}

.breadcrumb {
    color: var(--text-muted);

    font-size: 12px;

    margin-bottom: 10px;
}

.page-heading h1 {
    margin: 0 0 8px;

    font-size: 26px;

    font-weight: 750;

    letter-spacing: -0.5px;
}

.page-heading p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 14px;
}


/* ==========================================
   SEARCH HERO
   ========================================== */

.search-hero {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 28px;

    margin-bottom: 24px;

    box-shadow: var(--shadow);
}

.search-hero-content {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 22px;
}

.search-hero-icon {
    width: 48px;
    height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: var(--primary-light);

    color: var(--primary);

    border-radius: 12px;

    font-size: 25px;
}

.search-hero h2 {
    margin: 0 0 5px;

    font-size: 18px;
}

.search-hero p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 13px;
}

.search-input-wrapper {
    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 56px;

    border: 1px solid #d1d5db;

    border-radius: 10px;

    padding: 6px 6px 6px 16px;

    background: white;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input-icon {
    font-size: 22px;

    color: var(--text-muted);
}

.main-search-input {
    flex: 1;

    min-width: 0;

    border: none;

    outline: none;

    font-size: 14px;

    color: var(--text);
}

.main-search-input::placeholder {
    color: var(--text-muted);
}

.search-submit {
    border: none;

    border-radius: 8px;

    padding: 13px 24px;

    background: var(--primary);

    color: white;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: background 0.2s;
}

.search-submit:hover {
    background: var(--primary-dark);
}

.search-hint {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 14px;

    color: var(--text-muted);

    font-size: 11px;
}


/* ==========================================
   STATISTICS
   ========================================== */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;

    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 22px;

    box-shadow: var(--shadow);
}

.stat-card-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 18px;
}

.stat-icon {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    font-size: 22px;
}

.stat-icon-blue {
    background: #eff6ff;

    color: #2563eb;
}

.stat-icon-green {
    background: #f0fdf4;

    color: #16a34a;
}

.stat-icon-purple {
    background: #faf5ff;

    color: #9333ea;
}

.stat-label {
    color: var(--text-secondary);

    font-size: 12px;
}

.stat-value {
    font-size: 30px;

    font-weight: 750;

    letter-spacing: -0.5px;

    margin-bottom: 5px;
}

.stat-description {
    color: var(--text-muted);

    font-size: 12px;
}


/* ==========================================
   CONTENT CARDS
   ========================================== */

.content-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(0, 1fr);

    gap: 24px;
}

.content-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 24px;

    box-shadow: var(--shadow);
}

.content-card-header {
    margin-bottom: 22px;
}

.content-card-header h2 {
    margin: 0 0 6px;

    font-size: 16px;
}

.content-card-header p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 12px;
}


/* ==========================================
   QUICK ACTIONS
   ========================================== */

.quick-actions {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.quick-action {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 14px;

    border: 1px solid var(--border);

    border-radius: 10px;

    transition:
        border-color 0.2s,
        background 0.2s;
}

.quick-action:hover {
    background: #fafafa;

    border-color: #bfdbfe;
}

.quick-action-icon {
    width: 36px;
    height: 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: var(--primary-light);

    color: var(--primary);

    border-radius: 9px;

    font-size: 19px;
}

.quick-action > span:nth-child(2) {
    display: flex;

    flex-direction: column;

    gap: 4px;

    flex: 1;
}

.quick-action strong {
    font-size: 13px;
}

.quick-action small {
    color: var(--text-secondary);

    font-size: 11px;
}

.quick-action-arrow {
    color: var(--text-muted);

    font-size: 18px;
}


/* ==========================================
   ACCOUNT
   ========================================== */

.account-info {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 24px;
}

.account-avatar {
    width: 54px;
    height: 54px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #dbeafe;

    color: #1d4ed8;

    border-radius: 14px;

    font-size: 20px;

    font-weight: 700;
}

.account-details h3 {
    margin: 0 0 5px;

    font-size: 16px;
}

.account-details p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 12px;
}

.info-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    padding: 14px 0;

    border-top: 1px solid var(--border);

    font-size: 12px;
}

.info-row > span:first-child {
    color: var(--text-secondary);
}

.info-row strong {
    font-size: 12px;

    text-align: right;

    overflow-wrap: anywhere;
}

.status-badge {
    display: flex;

    align-items: center;

    gap: 6px;

    color: #16a34a;

    font-weight: 600;
}

.status-badge span {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #22c55e;
}


/* ==========================================
   FOOTER
   ========================================== */

.page-footer {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 22px 36px;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 11px;
}


/* ==========================================
   LOGIN
   ========================================== */

.login-wrapper {
    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background: var(--background);
}

.login-card {
    width: 100%;

    max-width: 420px;

    background: var(--surface);

    padding: 36px;

    border-radius: 16px;

    box-shadow:
        0 10px 40px rgba(15, 23, 42, 0.08);

    border: 1px solid var(--border);
}

.login-card h1 {
    margin: 0 0 10px;

    text-align: center;

    font-size: 28px;
}

.login-subtitle {
    text-align: center;

    color: var(--text-secondary);

    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-weight: 600;

    font-size: 13px;
}

.form-group input {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    font-size: 15px;

    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn {
    display: inline-block;

    width: 100%;

    border: none;

    border-radius: 8px;

    padding: 13px 18px;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;
}

.btn-primary {
    background: var(--primary);

    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.alert {
    padding: 12px 14px;

    border-radius: 8px;

    margin-bottom: 20px;

    font-size: 14px;
}

.alert-danger {
    background: #fee2e2;

    color: #991b1b;
}

.alert-success {
    background: #dcfce7;

    color: #166534;
}


/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1100px) {

    .content-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 900px) {

    :root {
        --sidebar-width: 230px;
    }

    .page-content {
        padding: 28px;
    }

    .topbar {
        padding: 0 28px;
    }

}

@media (max-width: 700px) {

    .sidebar {
        transform: translateX(-100%);

        transition: transform 0.25s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-area {
        margin-left: 0;
    }

    .mobile-menu-button {
        display: block;
    }

    .topbar {
        height: 68px;

        padding: 0 18px;

        gap: 12px;
    }

    .topbar-title {
        flex: 1;
    }

    .topbar-right {
        display: flex;
    }

    .topbar-right .online-indicator,
    .topbar-right .online-text {
        display: none;
    }

    .theme-toggle {
        margin-left: 0;
    }

    .page-content {
        padding: 22px 16px;
    }

    .page-heading h1 {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .stat-card {
        padding: 18px;
    }

    .search-hero {
        padding: 20px;
    }

    .search-input-wrapper {
        flex-wrap: wrap;

        padding: 10px 12px;
    }

    .main-search-input {
        min-width: 150px;
    }

    .search-submit {
        width: 100%;
    }

    .content-card {
        padding: 20px;
    }

    .page-footer {
        padding: 18px 16px;

        flex-direction: column;

        align-items: flex-start;
    }

}

@media (max-width: 480px) {

    .login-card {
        padding: 24px;
    }

    .login-card h1 {
        font-size: 24px;
    }

    .search-hero-content {
        align-items: flex-start;
    }

    .search-hero h2 {
        font-size: 16px;
    }

}

/* ==========================================
   IP DIRECTORY
   ========================================== */

.page-heading {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;
}

.page-heading-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 12px 18px;

    border-radius: 9px;

    background: var(--primary);

    color: #ffffff;

    font-size: 13px;

    font-weight: 600;

    white-space: nowrap;
}

.page-heading-button:hover {
    background: var(--primary-dark);
}

.table-search-form {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 24px;
}

.table-search-input {
    flex: 1;

    min-width: 0;

    padding: 13px 14px;

    border: 1px solid var(--border);

    border-radius: 9px;

    font-size: 13px;

    outline: none;
}

.table-search-input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-secondary {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 12px 16px;

    border-radius: 9px;

    border: 1px solid var(--border);

    background: var(--surface);

    color: var(--text-secondary);

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--background);

    color: var(--text);
}


/* ==========================================
   TABLE
   ========================================== */

.table-wrapper {
    width: 100%;

    overflow-x: auto;
}

.data-table {
    width: 100%;

    min-width: 720px;

    border-collapse: collapse;

    font-size: 13px;
}

.data-table th {
    padding: 14px 12px;

    background: #f9fafb;

    color: var(--text-secondary);

    font-size: 11px;

    font-weight: 700;

    text-align: left;

    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 16px 12px;

    border-bottom: 1px solid var(--border);

    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #fafcff;
}

.ip-badge {
    display: inline-block;

    padding: 6px 9px;

    border-radius: 7px;

    background: #eff6ff;

    color: #1d4ed8;

    font-family: monospace;

    font-size: 12px;

    font-weight: 600;

    white-space: nowrap;
}

.description-cell {
    display: block;

    max-width: 260px;

    color: var(--text-secondary);

    font-size: 12px;

    line-height: 1.5;

    overflow-wrap: anywhere;
}

.date-cell {
    color: var(--text-muted);

    font-size: 11px;

    white-space: nowrap;
}

.table-actions {
    display: flex;

    align-items: center;

    gap: 10px;

    white-space: nowrap;
}

.action-link {
    border: none;

    background: transparent;

    color: var(--primary);

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    padding: 4px 0;
}

.action-link:hover {
    text-decoration: underline;
}

.action-danger {
    color: #dc2626;
}


/* ==========================================
   FORM
   ========================================== */

.form-card {
    max-width: 760px;
}

.form-group small {
    display: block;

    margin-top: 7px;

    color: var(--text-muted);

    font-size: 11px;
}

.form-group textarea {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    font-size: 14px;

    font-family: inherit;

    resize: vertical;

    outline: none;
}

.form-group textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 12px;

    padding-top: 10px;
}

.form-actions .btn {
    width: auto;
}


/* ==========================================
   EMPTY STATE
   ========================================== */

.empty-state {
    text-align: center;

    padding: 60px 20px;
}

.empty-state-icon {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 56px;

    height: 56px;

    margin-bottom: 16px;

    border-radius: 14px;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 28px;
}

.empty-state h3 {
    margin: 0 0 8px;

    font-size: 16px;
}

.empty-state p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 13px;
}


/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 700px) {

    .page-heading {
        flex-direction: column;

        gap: 16px;
    }

    .page-heading-button {
        width: 100%;
    }

    .table-search-form {
        flex-wrap: wrap;
    }

    .table-search-input {
        flex-basis: 100%;
    }

    .table-search-form .search-submit {
        width: auto;
    }

    .form-actions {
        flex-direction: column-reverse;

        align-items: stretch;
    }

    .form-actions .btn,
    .form-actions .btn-secondary {
        width: 100%;
    }

}


/* ==========================================
   SMART SEARCH
   ========================================== */

.search-autocomplete {
    position: relative;

    width: 100%;
}

.directory-search-input {
    flex: 1;

    min-width: 0;
}

.directory-search-input
.table-search-input {
    width: 100%;
}

.search-suggestions {
    display: none;

    position: absolute;

    z-index: 500;

    top: calc(100% + 8px);

    left: 0;

    right: 0;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 10px;

    box-shadow:
        0 12px 35px
        rgba(15, 23, 42, 0.12);
}

.search-suggestions.open {
    display: block;
}

.search-suggestion {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 6px;

    padding: 4px 7px 4px 0;

    border-bottom:
        1px solid var(--border);

    background: #ffffff;
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover {
    background: #f8fafc;
}
.search-suggestion-select {
    flex: 1;

    min-width: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 14px;

    padding: 8px 14px;

    border: none;

    background: transparent;

    color: var(--text);

    text-align: left;

    cursor: pointer;
}
.search-suggestion-select small {
    flex-shrink: 0;

    color: var(--text-muted);

    font-size: 10px;
}
.search-suggestion-main {
    display: flex;

    align-items: center;

    gap: 12px;

    min-width: 0;
}

.search-suggestion-main strong {
    color: var(--primary);

    font-family: monospace;

    font-size: 12px;

    white-space: nowrap;
}

.search-suggestion-main span {
    overflow: hidden;

    color: var(--text-secondary);

    font-size: 12px;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.search-suggestion small {
    flex-shrink: 0;

    color: var(--text-muted);

    font-size: 10px;
}

/* ==========================================
   AJAX RESULTS
   ========================================== */

.search-status {
    min-height: 18px;

    margin-top: 10px;

    color: var(--text-muted);

    font-size: 11px;
}

.smart-search-results {
    margin-top: 10px;
}

.smart-search-title {
    margin: 20px 0 10px;

    color: var(--text-secondary);

    font-size: 12px;

    font-weight: 700;
}

.smart-search-similar-title {
    margin-top: 26px;

    color: #b45309;
}

.smart-search-result {
    padding: 15px 16px;

    margin-bottom: 8px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: #ffffff;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.smart-search-result:hover {
    border-color: #bfdbfe;

    box-shadow:
        0 3px 12px
        rgba(15, 23, 42, 0.04);
}

.smart-search-result-top {
    display: flex;

    align-items: center;

    gap: 12px;

    flex-wrap: wrap;
}

.smart-result-name {
    font-size: 13px;
}

.smart-result-description {
    margin: 9px 0 0;

    color: var(--text-secondary);

    font-size: 12px;

    line-height: 1.5;

    overflow-wrap: anywhere;
}

.similar-results {
    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 10px;
}

.similar-results
.search-suggestion {
    border-radius: 0;
}

.search-empty {
    padding: 32px 18px;

    text-align: center;

    border: 1px dashed var(--border);

    border-radius: 10px;

    background: #fafafa;
}

.search-empty strong {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
}

.search-empty p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 12px;
}

.directory-live-results {
    margin-bottom: 22px;
}


/* ==========================================
   MOBILE SMART SEARCH
   ========================================== */

@media (max-width: 700px) {

    .directory-search-input {
        flex-basis: 100%;
    }

    .search-suggestion-main {
        flex-direction: column;

        align-items: flex-start;

        gap: 4px;
    }

    .search-suggestion-main span {
        max-width: 220px;
    }

}
/* ==========================================
   USERS / GROUPS
   ========================================== */

.form-group select {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    background: #ffffff;

    color: var(--text);

    font-size: 14px;

    outline: none;
}

.form-group select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.1);
}

.checkbox-label {
    display: flex !important;

    align-items: center;

    gap: 10px;

    cursor: pointer;
}

.checkbox-label input {
    width: auto;

    margin: 0;
}

.status-disabled {
    display: inline-flex;

    padding: 5px 8px;

    border-radius: 6px;

    background: #fef2f2;

    color: #dc2626;

    font-size: 11px;

    font-weight: 600;
}

.system-badge {
    display: inline-flex;

    margin-left: 8px;

    padding: 4px 7px;

    border-radius: 6px;

    background: #f3e8ff;

    color: #7e22ce;

    font-size: 10px;

    font-weight: 700;

    white-space: nowrap;
}

.alert-info {
    background: #eff6ff;

    color: #1e40af;
}

.permissions-title {
    margin: 30px 0 14px;

    font-size: 15px;
}

.permissions-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 24px;
}

.permission-item {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    padding: 15px;

    border: 1px solid var(--border);

    border-radius: 10px;

    cursor: pointer;

    background: #ffffff;
}

.permission-item:hover {
    border-color: #bfdbfe;

    background: #fafcff;
}

.permission-item input {
    width: auto;

    margin-top: 3px;
}

.permission-item > span {
    display: flex;

    flex-direction: column;

    gap: 5px;
}

.permission-item strong {
    font-size: 12px;
}

.permission-item small {
    color: var(--text-secondary);

    font-size: 11px;

    line-height: 1.4;
}

.permission-item code {
    color: var(--primary);

    font-size: 10px;
}

@media (max-width: 700px) {

    .permissions-grid {
        grid-template-columns: 1fr;
    }

}
/* ==========================================
   AUDIT LOG
   ========================================== */

.audit-filters {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(130px, 1fr));

    gap: 12px;

    align-items: end;

    margin-bottom: 22px;
}

.audit-filter {
    display: flex;

    flex-direction: column;

    gap: 7px;
}

.audit-filter label {
    color: var(--text-secondary);

    font-size: 11px;

    font-weight: 600;
}

.audit-filter input,
.audit-filter select {
    width: 100%;

    min-height: 42px;

    padding: 10px 11px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: #ffffff;

    color: var(--text);

    font-size: 12px;

    outline: none;
}

.audit-filter input:focus,
.audit-filter select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.1);
}

.audit-filter-actions {
    display: flex;

    align-items: center;

    gap: 8px;

    grid-column: 1 / -1;
}

.audit-filter-actions .btn {
    width: auto;

    padding-left: 20px;

    padding-right: 20px;
}

.audit-summary {
    padding: 12px 0;

    color: var(--text-secondary);

    font-size: 12px;
}


/* BADGES */

.audit-badge {
    display: inline-flex;

    align-items: center;

    padding: 5px 8px;

    border-radius: 6px;

    font-size: 10px;

    font-weight: 700;

    white-space: nowrap;
}

.audit-success {
    background: #dcfce7;

    color: #166534;
}

.audit-danger {
    background: #fee2e2;

    color: #991b1b;
}

.audit-create {
    background: #eff6ff;

    color: #1d4ed8;
}

.audit-edit {
    background: #fef3c7;

    color: #92400e;
}

.audit-search {
    background: #f3e8ff;

    color: #7e22ce;
}

.audit-neutral {
    background: #f3f4f6;

    color: #4b5563;
}

.audit-description {
    display: block;

    max-width: 300px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    color: var(--text-secondary);

    font-size: 11px;
}

.text-muted {
    color: var(--text-muted);

    font-size: 11px;
}


/* PAGINATION */

.pagination {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 14px;

    margin-top: 24px;

    padding-top: 18px;

    border-top: 1px solid var(--border);

    font-size: 12px;
}

.pagination a {
    display: inline-flex;

    padding: 9px 12px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: #ffffff;

    color: var(--primary);

    font-weight: 600;
}

.pagination a:hover {
    background: var(--primary-light);
}


/* DETAILS */

.audit-detail-row {
    display: grid;

    grid-template-columns: 180px 1fr;

    gap: 20px;

    padding: 15px 0;

    border-bottom: 1px solid var(--border);

    font-size: 12px;
}

.audit-detail-row > span {
    color: var(--text-secondary);
}

.audit-detail-row code {
    overflow-wrap: anywhere;

    color: #374151;

    font-size: 11px;
}

.audit-detail-description strong,
.audit-detail-description code {
    line-height: 1.6;

    font-weight: normal;
}


/* RESPONSIVE */

@media (max-width: 1100px) {

    .audit-filters {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 700px) {

    .audit-filters {
        grid-template-columns: 1fr;
    }

    .audit-filter-actions {
        flex-direction: column;

        align-items: stretch;
    }

    .audit-filter-actions .btn,
    .audit-filter-actions .btn-secondary {
        width: 100%;
    }

    .pagination {
        flex-direction: column;

        align-items: stretch;

        text-align: center;
    }

    .pagination a {
        justify-content: center;
    }

    .audit-detail-row {
        grid-template-columns: 1fr;

        gap: 6px;
    }

}

/* ==========================================
   MESSAGE SECURITY
   ========================================== */

.settings-section-title {
    margin: 0 0 8px;

    font-size: 16px;
}

.settings-help {
    margin: 0 0 24px;

    color: var(--text-secondary);

    font-size: 12px;

    line-height: 1.6;
}

.crypto-status {
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 16px;

    margin-bottom: 28px;

    background: #f0fdf4;

    border: 1px solid #bbf7d0;

    border-radius: 10px;
}

.crypto-status-icon {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #22c55e;

    color: #ffffff;

    font-weight: 700;
}

.crypto-status strong {
    font-size: 13px;
}

.crypto-status p {
    margin: 4px 0 0;

    color: #166534;

    font-size: 11px;
}

.pin-unlock-card {
    max-width: 420px;

    margin-left: auto;

    margin-right: auto;
}

.pin-icon {
    margin-bottom: 20px;

    text-align: center;

    font-size: 38px;
}
/* ==========================================
   MESSAGES
   ========================================== */

.messages-toolbar {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 18px;

    padding-bottom: 16px;

    border-bottom:
        1px solid var(--border);
}

.crypto-unlocked {
    color: #16a34a;

    font-size: 11px;

    font-weight: 600;
}

.crypto-locked {
    color: #dc2626;

    font-size: 11px;

    font-weight: 600;
}

.messages-lock-link,
.messages-unlock-link {
    margin-left: 12px;

    color: var(--primary);

    font-size: 11px;

    font-weight: 600;
}


/* Conversation list */

.conversation-list {
    display: flex;

    flex-direction: column;
}

.conversation-item {
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 15px 10px;

    border-bottom:
        1px solid var(--border);

    transition: background 0.2s;
}

.conversation-item:hover {
    background: #f8fafc;
}

.conversation-avatar {
    width: 44px;
    height: 44px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    border-radius: 12px;

    background: #dbeafe;

    color: #1d4ed8;

    font-weight: 700;
}

.conversation-info {
    display: flex;

    flex-direction: column;

    gap: 5px;

    flex: 1;

    min-width: 0;
}

.conversation-info strong {
    font-size: 13px;
}

.conversation-info span {
    overflow: hidden;

    color: var(--text-muted);

    font-size: 11px;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.unread-badge,
.nav-unread-badge {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 20px;
    height: 20px;

    padding: 0 6px;

    border-radius: 10px;

    background: var(--primary);

    color: #ffffff;

    font-size: 10px;

    font-weight: 700;
}

.nav-unread-badge {
    margin-left: auto;
}


/* ==========================================
   NEW MESSAGE
   ========================================== */

.message-user-list {
    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-bottom: 24px;
}

.message-user-item {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 13px;

    border: 1px solid var(--border);

    border-radius: 10px;

    cursor: pointer;
}

.message-user-item:hover {
    border-color: #bfdbfe;

    background: #fafcff;
}

.message-user-item.disabled {
    opacity: 0.5;

    cursor: not-allowed;
}

.message-user-item input {
    width: auto;
}

.message-user-avatar {
    width: 36px;
    height: 36px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: var(--primary-light);

    color: var(--primary);

    font-weight: 700;
}

.message-user-info {
    display: flex;

    flex-direction: column;

    gap: 4px;
}

.message-user-info strong {
    font-size: 12px;
}

.message-user-info small {
    color: var(--text-secondary);

    font-size: 10px;
}


/* ==========================================
   CHAT
   ========================================== */

.chat-page {
    display: flex;

    flex-direction: column;

    min-height: calc(
        100vh - 190px
    );

    overflow: hidden;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

.chat-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 18px;

    padding: 18px 20px;

    border-bottom:
        1px solid var(--border);
}

.chat-header h1 {
    margin: 5px 0 3px;

    font-size: 17px;
}

.chat-header span {
    color: var(--text-muted);

    font-size: 10px;
}

.chat-back {
    color: var(--primary);

    font-size: 11px;

    font-weight: 600;
}

.chat-messages {
    flex: 1;

    min-height: 400px;

    max-height: calc(
        100vh - 350px
    );

    overflow-y: auto;

    padding: 22px;

    background: #f8fafc;
}

.chat-message-row {
    display: flex;

    margin-bottom: 12px;
}

.chat-message-row.mine {
    justify-content: flex-end;
}

.chat-message-row.other {
    justify-content: flex-start;
}

.chat-message {
    max-width: 70%;

    padding: 10px 12px;

    border-radius: 12px;

    background: #ffffff;

    border: 1px solid var(--border);

    box-shadow:
        0 2px 6px
        rgba(15, 23, 42, 0.03);
}

.chat-message-row.mine
.chat-message {
    background: #eff6ff;

    border-color: #bfdbfe;
}

.chat-sender {
    margin-bottom: 5px;

    color: var(--primary);

    font-size: 10px;

    font-weight: 700;
}

.chat-message-text {
    color: var(--text);

    font-size: 13px;

    line-height: 1.55;

    overflow-wrap: anywhere;
}

.chat-message-time {
    margin-top: 6px;

    color: var(--text-muted);

    font-size: 9px;

    text-align: right;
}

.chat-compose {
    display: flex;

    align-items: flex-end;

    gap: 10px;

    padding: 14px;

    border-top:
        1px solid var(--border);

    background: #ffffff;
}

.chat-compose textarea {
    flex: 1;

    min-height: 48px;

    max-height: 150px;

    resize: vertical;

    padding: 12px 13px;

    border: 1px solid var(--border);

    border-radius: 10px;

    font-family: inherit;

    font-size: 13px;

    outline: none;
}

.chat-compose textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.1);
}

.chat-send-button {
    min-height: 48px;

    padding: 0 18px;

    border: none;

    border-radius: 9px;

    background: var(--primary);

    color: white;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;
}

.chat-send-button:hover {
    background: var(--primary-dark);
}

.chat-empty {
    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 300px;

    color: var(--text-secondary);

    text-align: center;
}

.chat-empty strong {
    margin-bottom: 6px;

    color: var(--text);

    font-size: 14px;
}

.chat-empty span {
    font-size: 11px;
}

.message-security-warning {
    padding: 30px;

    text-align: center;
}

.message-security-warning strong {
    display: block;

    margin-bottom: 7px;

    font-size: 16px;
}

.message-security-warning p {
    margin: 0 auto 20px;

    max-width: 500px;

    color: var(--text-secondary);

    font-size: 12px;

    line-height: 1.6;
}


@media (max-width: 700px) {

    .chat-page {
        min-height:
            calc(100vh - 120px);
    }

    .chat-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .chat-message {
        max-width: 88%;
    }

    .chat-compose {
        align-items: stretch;

        flex-direction: column;
    }

    .chat-send-button {
        width: 100%;
    }

    .chat-messages {
        max-height: none;

        min-height: 400px;
    }

}
.audit-changes {
    margin-top: 30px;
}

.audit-changes h3 {
    margin-bottom: 14px;

    font-size: 15px;
}

.audit-change-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}

.audit-change-grid > div {
    min-width: 0;

    padding: 14px;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: #f9fafb;
}

.audit-change-grid strong {
    display: block;

    margin-bottom: 10px;

    font-size: 12px;
}

.audit-change-grid pre {
    margin: 0;

    overflow-x: auto;

    white-space: pre-wrap;

    overflow-wrap: anywhere;

    color: #374151;

    font-family:
        Consolas,
        monospace;

    font-size: 11px;

    line-height: 1.5;
}

@media (max-width: 700px) {

    .audit-change-grid {
        grid-template-columns: 1fr;
    }

}
/* ==========================================
   COPY IP
   ========================================== */

.ip-with-copy {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    vertical-align: middle;
}

.copy-ip-button {
    width: 28px;
    height: 28px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 0;

    border: 1px solid transparent;

    border-radius: 7px;

    background: transparent;

    color: #6b7280;

    font-size: 16px;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s,
        transform 0.15s;
}

.copy-ip-button:hover {
    background: #eff6ff;

    border-color: #bfdbfe;

    color: #2563eb;
}

.copy-ip-button:active {
    transform: scale(0.92);
}

.copy-ip-button:focus {
    outline: none;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.12);
}

.copy-ip-button.copied {
    background: #f0fdf4;

    border-color: #bbf7d0;

    color: #16a34a;
}

.copy-ip-button.copy-error {
    background: #fef2f2;

    border-color: #fecaca;

    color: #dc2626;
}

.copy-ip-icon {
    display: block;

    pointer-events: none;
}
/* ==========================================
   COMPLETE DARK THEME
   ========================================== */

html[data-theme="dark"] {
    color-scheme: dark;
}


/* BODY */

html[data-theme="dark"] body {
    background: var(--background);

    color: var(--text);
}


/* SIDEBAR */

html[data-theme="dark"]
.sidebar {
    background: #111827;

    border-color: var(--border);
}

html[data-theme="dark"]
.sidebar-brand {
    border-color: var(--border);
}

html[data-theme="dark"]
.nav-link:hover {
    background: #1f2937;

    color: #f9fafb;
}

html[data-theme="dark"]
.nav-link.active {
    background: #172554;

    color: #93c5fd;
}

html[data-theme="dark"]
.sidebar-bottom {
    border-color: var(--border);
}

html[data-theme="dark"]
.avatar,
html[data-theme="dark"]
.account-avatar {
    background: #1e3a5f;

    color: #93c5fd;
}

html[data-theme="dark"]
.logout-link:hover {
    background: #3f1d24;
}


/* TOPBAR */

html[data-theme="dark"]
.topbar {
    background: #111827;

    border-color: var(--border);
}


/* CARDS */

html[data-theme="dark"]
.search-hero,

html[data-theme="dark"]
.stat-card,

html[data-theme="dark"]
.content-card,

html[data-theme="dark"]
.login-card,

html[data-theme="dark"]
.chat-page {
    background: #111827;

    border-color: var(--border);
}


/* INPUTS */

html[data-theme="dark"]
.form-group input,

html[data-theme="dark"]
.form-group textarea,

html[data-theme="dark"]
.form-group select,

html[data-theme="dark"]
.table-search-input,

html[data-theme="dark"]
.audit-filter input,

html[data-theme="dark"]
.audit-filter select,

html[data-theme="dark"]
.chat-compose textarea {
    background: #0f172a;

    border-color: #334155;

    color: #f3f4f6;
}

html[data-theme="dark"]
.form-group input::placeholder,

html[data-theme="dark"]
.form-group textarea::placeholder,

html[data-theme="dark"]
.table-search-input::placeholder,

html[data-theme="dark"]
.chat-compose textarea::placeholder {
    color: #64748b;
}


/* SEARCH */

html[data-theme="dark"]
.search-input-wrapper {
    background: #0f172a;

    border-color: #334155;
}

html[data-theme="dark"]
.main-search-input {
    background: transparent;

    color: #f3f4f6;
}

html[data-theme="dark"]
.search-suggestions {
    background: #111827;

    border-color: #334155;

    box-shadow:
        0 12px 35px
        rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"]
.search-suggestion {
    background: #111827;

    border-color: #263244;
}

html[data-theme="dark"]
.search-suggestion:hover {
    background: #1f2937;
}

html[data-theme="dark"]
.search-suggestion-select {
    color: #f3f4f6;
}

html[data-theme="dark"]
.smart-search-result {
    background: #111827;

    border-color: #334155;
}

html[data-theme="dark"]
.smart-search-result:hover {
    background: #172033;

    border-color: #3b82f6;
}

html[data-theme="dark"]
.search-empty {
    background: #0f172a;

    border-color: #334155;
}


/* TABLE */

html[data-theme="dark"]
.data-table th {
    background: #172033;

    color: #9ca3af;

    border-color: #263244;
}

html[data-theme="dark"]
.data-table td {
    border-color: #263244;
}

html[data-theme="dark"]
.data-table tbody tr:hover {
    background: #172033;
}


/* IP BADGE */

html[data-theme="dark"]
.ip-badge {
    background: #172554;

    color: #93c5fd;
}


/* BUTTON SECONDARY */

html[data-theme="dark"]
.btn-secondary {
    background: #172033;

    border-color: #334155;

    color: #d1d5db;
}

html[data-theme="dark"]
.btn-secondary:hover {
    background: #1f2937;

    color: #ffffff;
}


/* QUICK ACTIONS */

html[data-theme="dark"]
.quick-action {
    border-color: #263244;
}

html[data-theme="dark"]
.quick-action:hover {
    background: #172033;

    border-color: #3b82f6;
}


/* PERMISSIONS */

html[data-theme="dark"]
.permission-item {
    background: #111827;

    border-color: #263244;
}

html[data-theme="dark"]
.permission-item:hover {
    background: #172033;

    border-color: #3b82f6;
}


/* USER SELECT */

html[data-theme="dark"]
.message-user-item {
    background: #111827;

    border-color: #263244;
}

html[data-theme="dark"]
.message-user-item:hover {
    background: #172033;

    border-color: #3b82f6;
}


/* MESSAGES */

html[data-theme="dark"]
.conversation-item {
    border-color: #263244;
}

html[data-theme="dark"]
.conversation-item:hover {
    background: #172033;
}

html[data-theme="dark"]
.chat-header {
    border-color: #263244;
}

html[data-theme="dark"]
.chat-messages {
    background: #0b1220;
}

html[data-theme="dark"]
.chat-compose {
    background: #111827;

    border-color: #263244;
}

html[data-theme="dark"]
.chat-message {
    background: #1f2937;

    border-color: #334155;
}

html[data-theme="dark"]
.chat-message-row.mine
.chat-message {
    background: #172554;

    border-color: #1d4ed8;
}

html[data-theme="dark"]
.chat-message-text {
    color: #f3f4f6;
}


/* AUDIT */

html[data-theme="dark"]
.audit-change-grid > div {
    background: #0f172a;

    border-color: #334155;
}

html[data-theme="dark"]
.audit-change-grid pre {
    color: #d1d5db;
}

html[data-theme="dark"]
.audit-detail-row {
    border-color: #263244;
}


/* PAGINATION */

html[data-theme="dark"]
.pagination {
    border-color: #263244;
}

html[data-theme="dark"]
.pagination a {
    background: #172033;

    border-color: #334155;

    color: #93c5fd;
}

html[data-theme="dark"]
.pagination a:hover {
    background: #1e293b;
}


/* COPY BUTTON */

html[data-theme="dark"]
.copy-ip-button {
    color: #94a3b8;
}

html[data-theme="dark"]
.copy-ip-button:hover {
    background: #172554;

    border-color: #1d4ed8;

    color: #93c5fd;
}

html[data-theme="dark"]
.copy-ip-button.copied {
    background: #052e16;

    border-color: #166534;

    color: #4ade80;
}


/* EMPTY / SYSTEM */

html[data-theme="dark"]
.empty-state-icon {
    background: #172554;

    color: #93c5fd;
}


/* SCROLLBARS */

html[data-theme="dark"] {
    scrollbar-color:
        #475569
        #0f172a;
}

html[data-theme="dark"]
::-webkit-scrollbar {
    width: 10px;

    height: 10px;
}

html[data-theme="dark"]
::-webkit-scrollbar-track {
    background: #0f172a;
}

html[data-theme="dark"]
::-webkit-scrollbar-thumb {
    background: #475569;

    border-radius: 10px;

    border: 2px solid #0f172a;
}

html[data-theme="dark"]
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
/* ==========================================
   THEME TOGGLE
   ========================================== */

.theme-toggle {
    width: 38px;
    height: 38px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-left: 14px;

    padding: 0;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: var(--surface);

    color: var(--text-secondary);

    font-size: 19px;

    cursor: pointer;

    transition:
        background 0.2s,
        color 0.2s,
        border-color 0.2s,
        transform 0.2s;
}

.theme-toggle:hover {
    background: var(--background);

    color: var(--primary);

    border-color: #bfdbfe;
}

.theme-toggle:active {
    transform: scale(0.93);
}

.theme-toggle-icon {
    display: block;

    line-height: 1;

    pointer-events: none;
}

html[data-theme="dark"]
.theme-toggle {
    background: #172033;

    border-color: #334155;

    color: #fbbf24;
}

html[data-theme="dark"]
.theme-toggle:hover {
    background: #1e293b;

    border-color: #475569;
}
/* ==========================================
   SEARCH RESULT ACTIONS
   ========================================== */

.smart-result-actions {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 13px;

    padding-top: 11px;

    border-top:
        1px solid var(--border);
}


.smart-result-edit,
.smart-result-delete {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 30px;

    padding: 6px 11px;

    border-radius: 7px;

    font-family: inherit;

    font-size: 11px;

    font-weight: 600;

    cursor: pointer;
}


/* Изменить */

.smart-result-edit {
    border:
        1px solid var(--border);

    background:
        var(--surface);

    color:
        var(--primary);
}

.smart-result-edit:hover {
    border-color:
        var(--primary);

    background:
        var(--primary-light);
}


/* Удалить */

.smart-result-delete-form {
    display: inline-flex;

    margin: 0;
}

.smart-result-delete {
    border:
        1px solid #fecaca;

    background:
        #fef2f2;

    color:
        #dc2626;
}

.smart-result-delete:hover {
    border-color:
        #fca5a5;

    background:
        #fee2e2;
}


/* DARK THEME */

html[data-theme="dark"]
.smart-result-edit {
    background:
        #172033;

    border-color:
        #334155;

    color:
        #93c5fd;
}

html[data-theme="dark"]
.smart-result-edit:hover {
    background:
        #172554;

    border-color:
        #3b82f6;
}

html[data-theme="dark"]
.smart-result-delete {
    background:
        #3f171c;

    border-color:
        #7f1d1d;

    color:
        #fca5a5;
}

html[data-theme="dark"]
.smart-result-delete:hover {
    background:
        #4c1d24;

    border-color:
        #991b1b;
}


/* MOBILE */

@media (max-width: 700px) {

    .smart-result-actions {
        flex-wrap: wrap;
    }

}

/* ==========================================
   SEARCH RESULT ACTIONS
   ========================================== */

.smart-result-actions {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 13px;

    padding-top: 11px;

    border-top:
        1px solid var(--border);
}

.smart-result-edit,
.smart-result-delete {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 30px;

    padding: 6px 11px;

    border-radius: 7px;

    font-family: inherit;

    font-size: 11px;

    font-weight: 600;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.15s,
        border-color 0.15s,
        color 0.15s;
}


/* Изменить */

.smart-result-edit {
    border:
        1px solid var(--border);

    background:
        var(--surface);

    color:
        var(--primary);
}

.smart-result-edit:hover {
    border-color:
        var(--primary);

    background:
        var(--primary-light);
}


/* Удалить */

.smart-result-delete-form {
    display: inline-flex;

    margin: 0;
}

.smart-result-delete {
    border:
        1px solid #fecaca;

    background:
        #fef2f2;

    color:
        #dc2626;
}

.smart-result-delete:hover {
    border-color:
        #fca5a5;

    background:
        #fee2e2;
}


/* Темная тема */

html[data-theme="dark"]
.smart-result-edit {
    background:
        #172033;

    border-color:
        #334155;

    color:
        #93c5fd;
}

html[data-theme="dark"]
.smart-result-edit:hover {
    background:
        #172554;

    border-color:
        #3b82f6;
}

html[data-theme="dark"]
.smart-result-delete {
    background:
        #3f171c;

    border-color:
        #7f1d1d;

    color:
        #fca5a5;
}

html[data-theme="dark"]
.smart-result-delete:hover {
    background:
        #4c1d24;

    border-color:
        #991b1b;
}


/* Мобильная версия */

@media (max-width: 700px) {

    .smart-result-actions {
        flex-wrap: wrap;
    }

}