/* -----------------------------------------------------------------------------
   Google Fonts (Bootstrap 5.3.3 is loaded directly via <link> in base.html)
   -----------------------------------------------------------------------------
*/
@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');

/* -----------------------------------------------------------------------------
   CSS Variables
   -----------------------------------------------------------------------------
*/
:root {
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --purple: #3F1BD0;
    --green-light: #98FD6A;
    --green-dark: #3D550C;
    --hover-green: #81B622;
    --pale-green: #ECF87F;
    --green: #59981A;
    --bright-green: #59981A;
    --danger: #ed2c23;
    --warning: #e2cc3d;
    --info: #17a2b8;
}

/* -----------------------------------------------------------------------------
   Custom Font Faces
   -----------------------------------------------------------------------------
*/
/* Font files removed - Avenir and Flama fonts were missing.
   Headings fall back to sans-serif via existing font-family declarations. */

/* -----------------------------------------------------------------------------
   Reset & Base Styles
   -----------------------------------------------------------------------------
*/
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    background-color: var(--light-gray);
    overflow-x: hidden; /* prevent horizontal scroll */
}
*, *::before, *::after {
    box-sizing: border-box;
}

/* -----------------------------------------------------------------------------
   Global Link Styles
   -----------------------------------------------------------------------------
*/
a {
    color: var(--purple);
    text-decoration: none;
}
a:hover,
a:focus {
    color: var(--hover-green);
    background: none;
    text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   Headings
   -----------------------------------------------------------------------------
*/
h1, h2, h3, h4, h5, h6 {
    font-family: 'Avenir', sans-serif;
    color: var(--dark-gray);
}

/* -----------------------------------------------------------------------------
   Button & Google Sign-In Styles
   -----------------------------------------------------------------------------
*/
button,
.btn {
    background-color: var(--purple);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
button:hover,
.btn:hover {
    background-color: var(--dark-gray);
}

/* Ensure Bootstrap button variants use the purple theme */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-info,
.btn-warning,
.btn-light,
.btn-dark {
    background-color: var(--purple);
    border-color: var(--purple);
    color: var(--white);
}
.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-info:hover,
.btn-warning:hover,
.btn-light:hover,
.btn-dark:hover {
    background-color: var(--dark-gray);
    border-color: var(--dark-gray);
    color: var(--white);
}

/* -----------------------------------------------------------------------------
   Page Header & Layout Tweaks
   Reduce excessive top spacing and improve responsiveness for header rows
   ----------------------------------------------------------------------------- */
.container.mt-5,
.container-fluid.mt-5,
.d-flex.justify-content-between.align-items-center.mt-5 {
    margin-top: 1rem !important;
}

.d-flex.justify-content-between.align-items-center.mt-5 {
    flex-wrap: wrap;
    gap: 1rem;
}

.google-sign-in-button {
    display: inline-block;
    background-color: var(--white);
    color: var(--dark-gray);
    border-radius: 4px;
    border: 1px solid var(--dark-gray);
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    text-decoration: none;
}
.google-sign-in-button:hover {
    background-color: var(--light-gray);
}

/* -----------------------------------------------------------------------------
   Form Styles - Underlined Inputs with Sliding Green Accent
   -----------------------------------------------------------------------------
*/
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Base underline input style */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="tel"] {
    font: 15px/24px 'Open Sans', Arial, sans-serif;
    color: var(--dark-gray);
    width: 100%;
    box-sizing: border-box;
    letter-spacing: 0.5px;
    border: 0;
    padding: 4px 0;
    border-bottom: 1px solid #ccc;
    background-color: transparent;
    transition: background-size 0.4s ease, border-color 0.3s ease;
    background-image: linear-gradient(var(--green), var(--green));
    background-size: 0% 2px;
    background-position: left bottom;
    background-repeat: no-repeat;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus {
    background-size: 100% 2px;
    border-color: #bbb;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="date"]::placeholder,
input[type="search"]::placeholder,
input[type="tel"]::placeholder {
    color: #8d8d8d;
}

/* Floating label */
.form-group label {
    position: absolute;
    left: 0;
    width: 100%;
    top: 9px;
    color: #aaa;
    transition: 0.3s;
    z-index: -1;
    letter-spacing: 0.5px;
    pointer-events: none;
}

input[type="text"]:focus ~ label,
input[type="email"]:focus ~ label,
input[type="password"]:focus ~ label,
input[type="number"]:focus ~ label,
input[type="date"]:focus ~ label,
.has-content ~ label {
    top: -16px;
    font-size: 12px;
    color: var(--green);
    transition: 0.3s;
}

/* Small inputs */
input[type="text"].form-control-sm,
input[type="email"].form-control-sm,
input[type="password"].form-control-sm,
input[type="number"].form-control-sm {
    font-size: 14px;
    padding: 3px 0;
}

input[type="text"].form-control-sm ~ label,
input[type="email"].form-control-sm ~ label,
input[type="password"].form-control-sm ~ label,
input[type="number"].form-control-sm ~ label {
    top: 7px;
    font-size: 14px;
}

input[type="text"].form-control-sm:focus ~ label,
input[type="email"].form-control-sm:focus ~ label,
input[type="password"].form-control-sm:focus ~ label,
input[type="number"].form-control-sm:focus ~ label,
.form-control-sm.has-content ~ label {
    top: -14px;
    font-size: 11px;
}

/* Select dropdowns - different styling */
select.form-control,
select.form-select,
select.form-control-sm,
select.form-select-sm {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background-color: var(--white);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font: 15px/24px 'Open Sans', Arial, sans-serif;
    color: var(--dark-gray);
}

select.form-control:focus,
select.form-select:focus,
select.form-control-sm:focus,
select.form-select-sm:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 0.2rem rgba(63, 27, 208, 0.25);
    outline: none;
}

/* Textareas */
textarea.form-control {
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    resize: vertical;
    font: 15px/24px 'Open Sans', Arial, sans-serif;
    color: var(--dark-gray);
}

textarea.form-control:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 0.2rem rgba(63, 27, 208, 0.25);
}

/* Input groups and inline forms - use standard border */
.input-group .form-control,
.form-inline .form-control,
.d-flex .form-control,
.row .form-control {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--white);
}

.input-group .form-control:focus,
.form-inline .form-control:focus,
.d-flex .form-control:focus,
.row .form-control:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 0.2rem rgba(63, 27, 208, 0.25);
}

/* Tooltip for password rules */
.tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    padding: .5rem;
    margin-top: .1rem;
    font-size: .875rem;
    color: var(--white);
    background-color: var(--dark-gray);
    border-radius: .25rem;
}
.form-group:hover .tooltip {
    display: block;
}

/* -----------------------------------------------------------------------------
   Table Styles
   -----------------------------------------------------------------------------
*/
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, .05);
}
.thead-dark th {
    color: var(--white);
    background-color: var(--dark-gray);
    border-color: var(--dark-gray);
}
.table th,
.table td {
    padding: .75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}
.table-hover tbody tr:hover {
    color: var(--purple);
    background-color: rgba(0, 0, 0, .075);
}

/* -----------------------------------------------------------------------------
   Registration Form & Separator
   -----------------------------------------------------------------------------
*/
.register-container {
    text-align: center;
    margin: auto;
    max-width: 400px;
}
.or-separator {
    margin: 20px 0;
    color: var(--purple);
}

/* -----------------------------------------------------------------------------
   Message Notification Styles
   -----------------------------------------------------------------------------
*/
.alert-messages {
    margin-bottom: 20px;
}
.alert {
    font-weight: bold;
    border-radius: 5px;
    border: 1px solid transparent;
    padding: 15px;
}
.alert-info {
    background-color: var(--info);
    color: var(--dark-gray);
}
.alert-success {
    background-color: var(--green);
    color: var(--white);
}
.alert-warning {
    background-color: var(--warning);
    color: var(--dark-gray);
}
.alert-danger {
    background-color: var(--danger);
    color: var(--white);
}
.alert-dismissible .close {
    position: absolute;
    top: 0;
    right: 10px;
    padding: 15px;
    color: inherit;
}

/* -----------------------------------------------------------------------------
   Assignment Status Pill Styles
   -----------------------------------------------------------------------------
*/
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4em 0.8em;
    border-radius: 1em;
    font-weight: bold;
    color: #fff;
}

.status-pill.client-status {
    background-color: var(--white);
    color: #000 !important;
    border: 1px solid var(--dark-gray);
    font-weight: bold;
}

.status-pill.client-status option {
    color: #000;
    background-color: var(--white);
    font-weight: bold;
}

.assignment-status {
    text-align: center;
    text-align-last: center;
}
.status-pill.to-claim-on-platform,
.status-pill.assigned {
    background-color: #d4edda;
    color: #155724;
}
.status-pill.editing,
.status-pill.waiting-on-client,
.status-pill.idea-pitch {
    background-color: #fff3cd;
    color: #856404;
}
.status-pill.submitted {
    background-color: #d4edda;
    color: #155724;
}
.status-pill.urgent-attention {
    background-color: #f8d7da;
    color: #721c24;
}

/* Toggle switch for auto invoice */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    left: 0;
    top: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--green);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* -----------------------------------------------------------------------------
   Left Sidebar & Navigation
   NOTE: Primary sidebar styles are in base.html <style> block for proper cascade.
   This section only contains supplementary styles not covered there.
   -----------------------------------------------------------------------------
*/

/* Focus states for accessibility */
#sidebarToggle:focus-visible,
#sidebarToggleMobile:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

#left-nav .nav-link:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: -2px;
    background-color: rgba(255, 255, 255, 0.12) !important;
}

/* Active nav item highlight */
#left-nav .nav-link.active,
#left-nav .nav-link[aria-current="page"] {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-left: 3px solid var(--purple);
}

#left-nav.collapsed .nav-link.active,
#left-nav.collapsed .nav-link[aria-current="page"] {
    border-left: none;
    border-bottom: 3px solid var(--purple);
}

/* Accessibility: Visually hidden class (Bootstrap 5 style) */
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* -----------------------------------------------------------------------------
   Responsive Adjustments
   -----------------------------------------------------------------------------
*/

/* Responsive button improvements - prevent overflow on small screens */
@media (max-width: 576px) {
    /* Allow buttons to wrap text on small screens */
    .btn, button, a.btn {
        white-space: normal !important;
        word-wrap: break-word;
        min-width: 0 !important;
    }
}

/* Ensure buttons don't exceed container */
.btn, button, a.btn {
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Add utility class for responsive buttons */
.responsive-btn {
    width: 100%;
    max-width: 300px;
}

@media (min-width: 768px) {
    .responsive-btn {
        white-space: nowrap;
    }
}

/* Prevent long text overflow in tables */
.table td {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Specifically for transaction descriptions and long text */
.transaction-description,
.address-block,
.long-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Enhanced mobile responsiveness */
@media (max-width: 576px) {
    /* Reduce padding on small screens */
    #main-content {
        padding: 0.5rem !important;
    }

    .container, .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Stack button groups vertically */
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        align-items: stretch !important;
    }

    .d-flex.justify-content-between.align-items-center > * {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Reduce table font size for better fit */
    .table {
        font-size: 0.85rem;
    }

    .table th, .table td {
        padding: 0.5rem;
    }
}

/* Extra small devices (< 375px - iPhone SE) */
@media (max-width: 374px) {
    .table {
        font-size: 0.75rem;
    }

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

/* Mobile layout - matches base.html breakpoint */
@media (max-width: 767.98px) {
    #main-content {
        margin-left: 0 !important;
    }
    footer.footer {
        margin-left: 0 !important;
    }
}

/* -----------------------------------------------------------------------------
   Toggle Switch
   ----------------------------------------------------------------------------- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.5rem;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 1.5rem;
}
.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 1.2rem;
    width: 1.2rem;
    left: 0.15rem;
    bottom: 0.15rem;
    background-color: var(--white);
    transition: 0.4s;
    border-radius: 50%;
}
.toggle-switch input:checked + .slider {
    background-color: var(--purple);
}
.toggle-switch input:checked + .slider:before {
    transform: translateX(1.5rem);
}
.toggle-switch input:disabled + .slider {
    background-color: #e9ecef;
    cursor: not-allowed;
}
.toggle-switch input:disabled + .slider:before {
    background-color: #adb5bd;
}

/* -----------------------------------------------------------------------------
   Revenue Trends chart tweaks
   ----------------------------------------------------------------------------- */
.revenue-trends-chart {
    position: relative;
    width: 100%;
    min-height: 220px;
}
.revenue-trends-chart canvas {
    width: 100% !important;
    height: 100% !important;
}
@media (max-width: 767px) {
    .revenue-trends-chart {
        min-height: 190px;
    }
}

/* -----------------------------------------------------------------------------
   Enhanced Card Styles (Invoice-like Cards)
   ----------------------------------------------------------------------------- */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Card headers with purple theme */
.card-header {
    background-color: var(--purple);
    color: var(--white);
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-header h5,
.card-header h6 {
    color: var(--white);
    margin-bottom: 0;
    font-weight: 600;
}

/* Colored border cards */
.card.border-left-purple {
    border-left: 4px solid var(--purple);
}

.card.border-left-success {
    border-left: 4px solid var(--green);
}

.card.border-left-warning {
    border-left: 4px solid var(--warning);
}

.card.border-left-danger {
    border-left: 4px solid var(--danger);
}

/* Info/stat cards */
.stat-card {
    background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
    border-left: 4px solid var(--purple);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--purple);
    font-family: 'Avenir', sans-serif;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Badge improvements */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 600;
    border-radius: 0.25rem;
}

.badge-purple {
    background-color: var(--purple);
    color: var(--white);
}

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

/* -----------------------------------------------------------------------------
   Animated Dropdown Menu Styles
   ----------------------------------------------------------------------------- */

/* Dropdown button/trigger */
.dropdown-button {
    background: #d6d5e2;
    border-radius: 50%;
    cursor: pointer;
    height: 26px;
    width: 26px;
    z-index: 1;
    position: relative;
    display: inline-block;
    border: none;
    transition: background 0.2s ease;
}

.dropdown-button:after {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--purple);
    content: ' ';
    height: 0;
    left: 8px;
    position: relative;
    top: -8px;
    width: 0;
}

.dropdown-button:hover {
    background: #c6c5d2;
}

.dropdown-button:active {
    background: #b6b5c2;
}

.dropdown-button-label {
    color: #898596;
    left: -64px;
    position: relative;
    font-size: 18px;
}

/* Dropdown menu container */
.dropdown-menu-animated {
    border-radius: 8px;
    height: auto;
    min-height: 100px;
    margin-top: 8px;
    position: absolute;
    width: 273px;
    z-index: 1000;
}

.dropdown-menu-animated .dropdown-shadow {
    left: -50px;
    opacity: 0;
    position: absolute;
    top: -46px;
    transition: opacity 400ms cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
}

.dropdown-menu-animated .dropdown-container {
    position: absolute;
    top: 0;
    left: 0;
}

.dropdown-menu-animated .dropdown-border1,
.dropdown-menu-animated .dropdown-border2 {
    fill: var(--white);
    fill-opacity: 0;
    stroke: var(--dark-gray);
    transition: stroke 400ms cubic-bezier(0.4, 0.0, 0.2, 1),
        stroke-dasharray 400ms cubic-bezier(0.4, 0.0, 0.2, 1),
        stroke-dashoffset 400ms cubic-bezier(0.4, 0.0, 0.2, 1),
        fill-opacity 400ms 40ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.dropdown-menu-animated .dropdown-border1 {
    stroke-dasharray: 480 480;
    stroke-dashoffset: -480px;
}

.dropdown-menu-animated .dropdown-border2 {
    stroke-dasharray: 0 480;
    stroke-dashoffset: 0;
}

.dropdown-menu-animated .dropdown-contents {
    left: 20px;
    opacity: 0;
    position: relative;
    top: 48px;
    transition: opacity 400ms cubic-bezier(0.4, 0.0, 0.2, 1);
    width: 234px;
}

.dropdown-menu-animated .dropdown-row {
    align-items: center;
    border-bottom: 1px solid #cdd0de;
    cursor: pointer;
    display: flex;
    height: 46px;
    padding: 0 5px;
    user-select: none;
    -moz-user-select: none;
    color: var(--dark-gray);
    text-decoration: none;
    background: transparent;
    transition: background 0.2s ease;
}

.dropdown-menu-animated .dropdown-row:last-child {
    border-bottom: none;
}

.dropdown-menu-animated .dropdown-row:hover {
    background: #f8f8f8;
    color: var(--purple);
}

.dropdown-menu-animated .dropdown-row:active {
    background: #f5f5f5;
}

/* Expanded state */
.dropdown-expanded .dropdown-shadow {
    opacity: 1;
}

.dropdown-expanded .dropdown-border1 {
    fill-opacity: 1;
    stroke: #c6c6cc;
    stroke-dasharray: 480 480;
    stroke-dashoffset: 0;
}

.dropdown-expanded .dropdown-border2 {
    fill-opacity: 1;
    stroke: #c6c6cc;
    stroke-dasharray: 480 480;
    stroke-dashoffset: 0;
}

.dropdown-expanded .dropdown-contents {
    opacity: 1;
    transition: opacity 400ms 100ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Responsive adjustments for dropdown */
@media (max-width: 576px) {
    .dropdown-menu-animated {
        width: 90vw;
        max-width: 273px;
    }

    .dropdown-menu-animated .dropdown-contents {
        width: calc(100% - 40px);
    }
}

/* -----------------------------------------------------------------------------
   Help Tooltip Icon - Reusable Component
   ----------------------------------------------------------------------------- */
.help-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
    color: #6c757d;
    cursor: help;
    transition: color 0.2s ease;
}

.help-tooltip-icon:hover {
    color: var(--purple);
}

.help-tooltip-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* -----------------------------------------------------------------------------
   URL Link Confirmation Modal
   ----------------------------------------------------------------------------- */
.url-confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.url-confirmation-modal {
    background-color: var(--white);
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.url-confirmation-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.url-confirmation-close:hover {
    color: var(--danger);
}

.url-confirmation-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.url-confirmation-url {
    background-color: var(--light-gray);
    padding: 0.75rem;
    border-radius: 0.25rem;
    word-break: break-all;
    margin-bottom: 1.5rem;
    font-family: monospace;
    font-size: 0.9rem;
}

.url-confirmation-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.url-confirmation-buttons .btn {
    padding: 0.5rem 1.5rem;
}

/* Notes textarea with clickable URLs */
.notes-display {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
}

.notes-display .clickable-url {
    color: var(--purple);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.notes-display .clickable-url:hover {
    color: var(--hover-green);
}

/* -----------------------------------------------------------------------------
   New User Overlay (Dashboard - No Clients)
   ----------------------------------------------------------------------------- */
.new-user-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.new-user-modal {
    background-color: var(--white);
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

.new-user-content {
    padding: 2.5rem;
    text-align: center;
}

.new-user-content h2 {
    color: var(--purple);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.new-user-content p {
    color: var(--dark-gray);
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.new-user-content .btn {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* -----------------------------------------------------------------------------
   Mobile Table Responsiveness
   - Tables take ~95% width on mobile for better visibility
   - Utility classes to hide less important columns on smaller screens
   ----------------------------------------------------------------------------- */

/* Mobile table width - nearly full width on small screens */
@media (max-width: 768px) {
    .table-responsive {
        width: 95%;
        margin-left: auto;
        margin-right: auto;
    }

    .table {
        width: 100%;
    }

    /* Reduce cell padding on mobile for more content space */
    .table th,
    .table td {
        padding: 0.4rem 0.25rem;
        font-size: 0.8rem;
    }

    /* Make table text smaller on mobile */
    .table .badge {
        font-size: 0.7rem;
        padding: 0.3em 0.5em;
    }

    /* Compact status dropdown on mobile */
    .table .form-select {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        min-width: 80px;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 576px) {
    .table-responsive {
        width: 98%;
    }

    .table th,
    .table td {
        padding: 0.35rem 0.2rem;
        font-size: 0.75rem;
    }

    /* Even more compact on tiny screens */
    .table .form-select {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Column visibility utility classes for responsive tables */
/* Hide on mobile, show on medium screens and up */
.d-table-cell-md {
    display: none !important;
}

@media (min-width: 768px) {
    .d-table-cell-md {
        display: table-cell !important;
    }
}

/* Hide on mobile, show on large screens and up */
.d-table-cell-lg {
    display: none !important;
}

@media (min-width: 992px) {
    .d-table-cell-lg {
        display: table-cell !important;
    }
}

/* Hide on all screens smaller than sm (576px) */
.d-table-cell-sm {
    display: none !important;
}

@media (min-width: 576px) {
    .d-table-cell-sm {
        display: table-cell !important;
    }
}

/* Mobile-only visible (hide on desktop) */
.d-table-cell-mobile-only {
    display: table-cell !important;
}

@media (min-width: 768px) {
    .d-table-cell-mobile-only {
        display: none !important;
    }
}

/* Utility class to truncate long text in table cells on mobile */
@media (max-width: 768px) {
    .table-truncate-mobile {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    .table-truncate-mobile {
        max-width: 70px;
    }
}

/* -----------------------------------------------------------------------------
   Android WebView Detection - Hide Google/Passkey/MFA options
   These elements are hidden when the app is loaded in com.freelancerdashboard WebView
   ----------------------------------------------------------------------------- */
.webview-hide {
    /* Default: show elements */
}

/* When body has webview-app class (added via JavaScript), hide these elements */
body.webview-app .webview-hide {
    display: none !important;
}
