/*
Theme Name: Pak Legal Desk AI v2
Theme URI: https:/paklegaldesk.com/
Author: Pak Legal Desk
Author URI: https://paklegaldesk.com/
Description: AI-powered legal workspace with text/voice chat, contract generation, smart review, verified lawyer marketplace, and subscription-based access. Built for Pakistani legal professionals and clients.
Version: 2.1.0
License: GPL v2 or later
Text Domain: pak-legal-desk
Domain Path: /languages
Tags: legal, ai, contracts, lawyer, marketplace, voice, chat, document-review, subscription
*/

/* ========== RESET & BASE ========== */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== FIXED DESKTOP HEADER ========== */
.pak-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #dbdbdb;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}
.pak-header-inner {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.pak-logo {
    font-family: 'Grand Hotel', cursive;
    font-size: 24px;
    color: #262626;
    white-space: nowrap;
}
.pak-logo span {
    color: #1dbf73;
}

/* ========== SEARCH FORM ========== */
.pak-search-form {
    display: flex;
    align-items: center;
    background: #f7f7f7;
    border: 1px solid #e4e5e7;
    border-radius: 8px;
    padding: 4px 12px;
    max-width: 400px;
    flex: 1;
    margin: 0 auto;
}
.pak-search-form input[type="text"] {
    border: none;
    background: transparent;
    outline: none;
    padding: 6px 0;
    width: 100%;
    font-size: 14px;
    color: #262626;
}
.pak-search-form input[type="text"]::placeholder {
    color: #8e8e8e;
}
.pak-search-form button {
    background: none;
    border: none;
    color: #1dbf73;
    cursor: pointer;
    font-size: 16px;
}

/* ========== HEADER ICONS ========== */
.pak-nav-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}
.pak-nav-icons a,
.pak-nav-icons button {
    color: #262626;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    position: relative;
    transition: transform 0.2s ease, opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pak-nav-icons a:hover,
.pak-nav-icons button:hover {
    transform: translateY(-2px);
    opacity: 0.85;
}
.icon-home { color: #29b6f6 !important; }
.icon-ai { color: #8e44ad !important; }
.icon-msg { color: #ff9800 !important; }
.icon-notif { color: #e91e63 !important; }
.icon-dash { color: #1dbf73 !important; }
.icon-services { color: #20c997 !important; }
.icon-lawyers { color: #3b5998 !important; }

.pak-nav-icons .badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #ff4757;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    display: none;
}
.pak-nav-icons .profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1dbf73;
    cursor: pointer;
}

/* ========== DROPDOWNS ========== */
.pak-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 200px;
    z-index: 200;
    padding: 6px 0;
}
.pak-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #262626;
    font-size: 14px;
    transition: background 0.2s;
}
.pak-dropdown a:hover {
    background: #f8f9fa;
}
.pak-dropdown .divider {
    height: 1px;
    background: #efefef;
    margin: 4px 0;
}

/* ========== MOBILE HEADER & DOCK (default hidden) ========== */
.pak-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #dbdbdb;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    gap: 8px;
}
.pak-mobile-header .mobile-logo {
    font-family: 'Grand Hotel', cursive;
    font-size: 20px;
    color: #262626;
    white-space: nowrap;
}
.pak-mobile-header .mobile-hamburger {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #262626;
    padding: 4px;
}
.mobile-search-form {
    display: flex;
    align-items: center;
    background: #f7f7f7;
    border: 1px solid #e4e5e7;
    border-radius: 8px;
    padding: 0 8px;
    flex: 1;
    height: 36px;
}
.mobile-search-form input[type="text"] {
    border: none;
    background: transparent;
    padding: 4px 0;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: #262626;
}
.mobile-search-form button {
    background: none;
    border: none;
    color: #1dbf73;
    cursor: pointer;
    font-size: 15px;
}
.pak-mobile-dock {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55px;
    background: #fff;
    border-top: 1px solid #dbdbdb;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}
.pak-mobile-dock a {
    color: #262626;
    font-size: 20px;
    position: relative;
}
.pak-mobile-dock .badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #ff4757;
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    display: none;
}

/* ========== SIDEBAR & FIVERR DASHBOARD (shared) ========== */
.pld-fiverr-dashboard {
    display: flex;
    min-height: 100vh;
}
.pld-sidebar {
    width: 250px;
    background: #222325;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}
.pld-sidebar-logo {
    font-family: 'Grand Hotel', cursive;
    font-size: 24px;
    color: #1dbf73;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}
.pld-sidebar-nav {
    flex: 1;
}
.pld-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #b2b2b2;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}
.pld-sidebar-nav a:hover,
.pld-sidebar-nav a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.pld-sidebar-nav a i {
    width: 20px;
    text-align: center;
}
.pld-sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}
.pld-sidebar-footer a {
    color: #b2b2b2;
    font-size: 0.9rem;
}
.pld-main-area {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
}
.pld-top-bar {
    background: #fff;
    border-bottom: 1px solid #e4e5e7;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.pld-search-box {
    display: flex;
    align-items: center;
    background: #f7f7f7;
    border: 1px solid #e4e5e7;
    border-radius: 6px;
    padding: 6px 12px;
    flex: 1;
    max-width: 400px;
}
.pld-search-box input {
    border: none;
    background: transparent;
    outline: none;
    padding: 4px;
    flex: 1;
    font-size: 14px;
}
.pld-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.pld-notif-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 20px;
    color: #555;
    cursor: pointer;
}
.pld-notif-btn .badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ff4757;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}
.pld-user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}
.pld-user-menu img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1dbf73;
}
.pld-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: #fff;
    border: 1px solid #e4e5e7;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 200;
    padding: 8px 0;
}
.pld-dropdown a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
}
.pld-dropdown a:hover {
    background: #f5f5f5;
}

/* ========== CONTENT CARDS & TABLES ========== */
.pld-content {
    padding: 24px;
}
.pld-welcome {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: #222;
}
.pld-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.pld-stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 14px;
}
.pld-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}
.pld-stat-icon.green { background: #1dbf73; }
.pld-stat-icon.blue { background: #4e73df; }
.pld-stat-icon.orange { background: #f39c12; }
.pld-stat-icon.red { background: #e74c3c; }
.pld-stat-info h4 {
    margin: 0;
    font-size: 1.4rem;
    color: #1a1a2e;
}
.pld-stat-info span {
    font-size: 0.85rem;
    color: #888;
}
.pld-section-title {
    font-size: 1.2rem;
    margin: 30px 0 15px;
    color: #222;
}
.pld-recent-table {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    overflow: hidden;
}
.pld-table {
    width: 100%;
    border-collapse: collapse;
}
.pld-table th, .pld-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}
.pld-table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
}
.pld-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.pld-badge.completed { background: #e6f9ee; color: #1dbf73; }
.pld-badge.pending { background: #fef3e0; color: #e67e22; }
.pld-badge.draft { background: #e8ebf7; color: #4e73df; }

/* ========== BUTTONS & ACTIONS ========== */
.pld-action-btns {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}
.pld-btn {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    cursor: pointer;
    transition: background 0.2s;
}
.pld-btn-primary {
    background: #1dbf73;
    color: #fff;
}
.pld-btn-primary:hover {
    background: #19a463;
}
.pld-btn-outline {
    background: transparent;
    border: 1px solid #d1d1d1;
    color: #333;
}
.pld-btn-outline:hover {
    background: #f5f5f5;
}

/* ========== FORMS & INPUTS ========== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
    font-family: inherit;
    font-size: 0.95rem;
}
.pld-form-group {
    margin-bottom: 20px;
}
.pld-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}
.pld-form-group input,
.pld-form-group select,
.pld-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* ========== DOCUMENT GRID ========== */
.pld-document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.pld-doc-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.pld-doc-card h4 {
    margin: 0 0 10px;
}
.pld-doc-date {
    color: #888;
    font-size: 0.85rem;
}
.pld-doc-actions {
    margin-top: 15px;
}

/* ========== WALLET TOP-UP ========== */
.topup-container {
    max-width: 500px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.topup-container h2 {
    margin: 0 0 20px;
}
.bank-details {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ========== GUEST LINKS ========== */
.guest-right-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    font-weight: 600;
    color: #404145;
}
.guest-right-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}
.guest-join-btn {
    background: #1dbf73;
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.guest-signin-link {
    color: #62646a;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* ========== MOBILE SLIDE MENU (hidden by default) ========== */
.mobile-slide-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 2000;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.mobile-slide-menu.open {
    transform: translateX(0);
}
.slide-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1999;
}

/* ========== RESPONSIVE (MOBILE) ========== */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
        padding-bottom: 55px;
    }
    .homepage-wrapper,
    .site-content-wrapper,
    .container,
    .content-area,
    .entry-content,
    .pak-header,
    .pak-mobile-header,
    .pld-dashboard-container,
    .pld-fiverr-dashboard,
    .pld-content,
    .pld-stats-row,
    .pld-recent-table,
    .payment-wrapper,
    .contract-generator-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .pld-stats-row,
    .pld-dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .pld-recent-table,
    .pld-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .pak-header {
        display: none !important;
    }
    .pak-mobile-header {
        display: flex !important;
    }
    .pak-mobile-dock {
        display: flex !important;
    }

    .pld-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .pld-sidebar.open {
        transform: translateX(0);
    }
    .pld-main-area {
        margin-left: 0 !important;
    }

    .pld-action-btns {
        flex-direction: column;
    }
    .pld-action-btns .pld-btn {
        width: 100%;
        text-align: center;
    }

    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    textarea,
    select {
        width: 100%;
    }

    .lawyer-card,
    .profile-detail-card {
        flex-direction: column;
        text-align: center;
    }

    .desktop-only {
        display: none !important;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
}

/* ========== FONT IMPORT ========== */
@import url('https://fonts.googleapis.com/css2?family=Grand+Hotel&display=swap');