:root {
    --primary-dark: #0e0e0e;
    --secondary-dark: #161616;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --error-red: #ef4444;
    --border-subtle: rgba(148, 163, 184, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

.custom-scrollbar {
    scrollbar-gutter: auto;
    scrollbar-width: thin;
    scrollbar-color: #414141 transparent;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    border-radius: 7px;
    background: var(--secondary-dark);
    border-radius: 3px;
}

.tool-button{
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeScale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.bg-slate-900\/60 {
    background-color: rgb(17 17 17 / 62%)  !important;
}

.animate-slide-in {
    animation: slideInRight 0.3s ease-out forwards;
}

.animate-fade-scale {
    animation: fadeScale 0.2s ease-out forwards;
}

.skeleton-loading {
    background: linear-gradient(90deg,
            var(--secondary-dark) 25%,
            rgba(28, 28, 28, 0.1) 50%,
            var(--secondary-dark) 75%);
}


.skeleton-loading::after {
    background: linear-gradient(90deg,
            var(--secondary-dark) 25%,
            rgba(28, 28, 28, 0.1) 50%,
            var(--secondary-dark) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}


.email-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "sidebar header"
        "sidebar main";
}


@media (max-width: 768px) {
    .email-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main";
    }
}

.bg-slate-900 {
    --tw-bg-opacity: 1;
    background-color: rgb(17 17 17) !important;
}

.bg-slate-800 {
    --tw-bg-opacity: 1;
    background-color: rgb(25 25 25) !important;
}

.border-slate-700 {
    --tw-border-opacity: 1;
    border-color: rgb(56 56 56) !important;
}

.bg-slate-700\/50 {
    background-color: rgb(60 60 60 / 50%) !important;
}

.border-slate-800 {
    --tw-border-opacity: 1;
    border-color: rgb(56 56 56 / 71%) !important;
}

.slide-in {
    animation: sophisticatedEntry 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    backface-visibility: hidden;
}

@keyframes sophisticatedEntry {
    0% {
        transform: translate3d(0, 30%, -100px) rotateX(20deg);
        opacity: 0;
        filter: blur(8px);
    }

    40% {
        opacity: 0.6;
        filter: blur(4px);
    }

    100% {
        transform: translate3d(0, 0, 0) rotateX(0);
        opacity: 1;
    }
}

@keyframes slideIn-BIG {
    0% {
        transform: translate3d(0, 100%, -100px) rotateX(20deg);
        opacity: 0;
        filter: blur(8px);
    }

    40% {
        opacity: 0.6;
        filter: blur(4px);
    }

    100% {
        transform: translate3d(0, 0, 0) rotateX(0);
        opacity: 1;
    }
}

.slide-in-big {
    animation: slideIn-BIG 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    backface-visibility: hidden;
}

.action-cards {
    z-index: 100;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: none;
    gap: 2rem;
    pointer-events: none;
}

.action-card {
    padding: 2rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-card.delete {
    background: linear-gradient(135deg,
            rgba(239, 68, 68, 0.2) 0%,
            rgba(153, 27, 27, 0.3) 100%);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.action-card.archive {
    background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.2) 0%,
            rgba(29, 78, 216, 0.3) 100%);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.action-card svg {
    width: 2rem;
    height: 2rem;
    transition: transform 0.3s ease;
    margin-bottom: 0.5rem;
}

.action-card span {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.action-card.delete svg {
    color: rgb(239, 68, 68);
}

.action-card.archive svg {
    color: rgb(59, 130, 246);
}

.action-cards.show {
    display: flex;
}

.action-cards.active .action-card {
    transform: scale(1.1) translateY(-10px);
}

.action-cards.active .action-card::before {
    opacity: 1;
}

.action-cards.active .action-card svg {
    transform: scale(1.2);
}

.action-cards.active .action-card span {
    transform: translateY(0);
    opacity: 1;
}


.action-cards.show .action-card {
    animation: cardPulse 2s infinite;
}

.email-item {
    cursor: move;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.email-item:hover {
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.email-item.dragging {
    opacity: 0.7;
    transform: scale(1.02) rotate(-1deg);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.email-item.dragging::before {
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    transform: translateX(0);
}

.sidebar {
    width: 280px;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar.collapsed {
    width: 80px;
}

.email-grid.collapsed {
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "sidebar header"
        "sidebar main";
}

.sidebar.collapsed .hide-when-collapsed {
    display: none;
}

.sidebar.collapsed .flex.items-center.mb-4.m-4.justify-between {
    justify-content: center;
    justify-items: center;
}

.sidebar.collapsed .sidebar-item {
    padding: 0.75rem;
    justify-content: center;
}

.sidebar.collapsed .compose-btn {
    padding: 0.75rem;
}

.sidebar.collapsed .sidebar-toggle {
    position: absolute;
    right: -61px;
    top: 34px;
    background: rgba(17, 17, 17, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    overflow: hidden;
    border: 2px solid #334155;
    border-radius: 13px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
}

@media (prefers-color-scheme: dark) {
    .dark\:bg-gray-800 {
        --tw-bg-opacity: 1;
        background-color: rgb(34 34 34 ) !important;
    }

}

@media (prefers-color-scheme: dark) {
    .dark\:bg-gray-700 {
        --tw-bg-opacity: 1;
        background-color: rgb(46 46 46) !important;
    }

}

@media (prefers-color-scheme: dark) {
    .dark\:border-gray-700 {
        --tw-border-opacity: 1;
        border-color: rgb(75 75 75) !important;
    }

}

@media (prefers-color-scheme: dark) {
    .dark\:hover\:bg-gray-700:hover {
        --tw-bg-opacity: 1;
        background-color: rgb(42 42 42) !important;
    }

}

.sidebar.collapsed .compose-btn span {
    display: none;
}

.glow-effect {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 0.2);
}
.glow-effect:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 0 0 30px rgba(255, 255, 255, 0.4);
}


.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 48px;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 20;
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid #1e293b;
}

.status-online {
    background-color: #22c55e;
}

.sidebar.collapsed .count-badge {
    display: none;
}

.sidebar.collapsed #aside-footer .flex {
    flex-direction: column;
    justify-content: center;
}

.sidebar.collapsed .user-profile {
    justify-content: center;
}

.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .section-title {
    display: none;
}

.sidebar.collapsed .sidebar-footer {
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
}

.fade-in:not(class="hidden") {
    animation: fadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeOut 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeOUt {
    to {
        opacity: 0;
    }

    from {
        opacity: 1;
    }
}

.sidebar *,
.sidebar-toggle {
    transition: all 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.dialog-over {
    filter: blur(4px) saturate(1.5) brightness(0.5);
    transform: scale(1.2)
}


.slide-in-big-dd {
    animation: slideInBig-dd 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: height, opacity, transform, filter;
}

@keyframes slideInBig-dd {
    from {
        opacity: 0;
        transform: translateY(-10%);
        filter: blur(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #ffffff;
    position: relative;
    display: inline-block;
    animation: fadeInDown 1s ease-out;
}

.description {
    font-size: 1.1rem;
    color: #b0b0b0;
    animation: fadeInUp 1s ease-out;
}

.login-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: fadeIn 1.5s ease-out;
}

.login-card {
    border-radius: 20px;
    
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    border: 1px solid #3a3a3a;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.155);
}

.leaflet-control-layers-toggle {
    background-image: url('https://unpkg.com/leaflet@1.9.3/dist/images/layers.png');
    background-size: 20px 20px;
    width: 30px;
    height: 30px;
}

.popup-content {
    font-size: 0.9rem;
    color: #ffffff;
}

.leaflet-tooltip.my-tooltip {
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.8rem;
}

.map-search-bar {
    position: absolute;
    top: 10px;
    left: 50px;
    display: none !important;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.leaflet-control-geocoder{
    display: none !important;
}

.map-search-bar input {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    outline: none;
    font-size: 0.9rem;
}

.map-search-bar button {
    background-color: #00b09b;
    border: none;
    color: #ffffff;
    padding: 5px 10px;
    margin-left: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.map-search-bar button:hover {
    background-color: #009678;
}

.card-header {
    display: flex;
    padding: 25px;
    background: linear-gradient(45deg, #00b09b08, #00000014);
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-id {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.login-card.expanded {
    max-height: 600px;
    transition: max-height 0.5s ease;
}


.timestamp {
    font-size: 0.9rem;
    color: #a0a0a0;
}

.status {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(45deg, #00b09b, #96c93d);
    color: #ffffff;
    box-shadow: 0 0 20px rgb(0 176 155 / 4%);
    transition: background 0.3s ease;
}

.status.active {
    background: linear-gradient(45deg, #00b09b08, #ffffff14);
}

.status.inactive {
    background: linear-gradient(45deg, #ff4e50, #f9d423);
}

.card-body {
    padding-left: 25px;
    padding-right: 25px;
    padding-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label {
    flex: 0 0 150px;
    font-weight: 600;
    color: #b0b0b0;
    position: relative;
}

.info-label::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 2px;
    background: linear-gradient(45deg, #00b09b08, #ffffff14);
    bottom: -5px;
    left: 0;
}

.info-value {
    flex: 1;
    color: #e0e0e0;
    word-break: break-all;
}

.map-container {
    width: 100%;
    height: 250px;
    margin-top: 10px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #222222;
    transition: all 0.3s ease;
}

.leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar {
    border: 2px solid rgba(0, 0, 0, 0.2);
    overflow: hidden !important;
    border-radius: 12px !important;

    a {
        background: rgba(17, 17, 17, 0.7);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #eee;
        overflow: hidden;
    }

    a:hover {
        box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
        transform: translateY(-2px);
    }
}

.leaflet-control-fullscreen a {
    background: #2a2a2a17 url(https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/fullscreen.png) no-repeat 0 0;
    background-size: 26px 52px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}



.error-message {
    color: #ff4d4f;
    background-color: #1e1e1e;
    padding: 20px;
    border-left: 5px solid #ff4d4f;
    border-radius: 10px;
    font-size: 1rem;
    animation: fadeIn 1s ease-out;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar Styling */
.login-list {
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.login-list::-webkit-scrollbar {
    width: 8px;
}

.login-list::-webkit-scrollbar-track {
    background: transparent;
}

.login-list::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 4px;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .info-label {
        flex: 0 0 120px;
    }

    .map-container {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .info-label {
        flex: 0 0 100px;
    }

    .map-container {
        height: 180px;
    }
}
/* Attachment Container Styles */
.attachment-container {
    display: flex;
    align-items: center;
    background-color: #374151; /* slate-700 */
    padding: 0.5rem;
    border-radius: 0.375rem; /* rounded-md */
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.attachment-container svg {
    flex-shrink: 0;
}

.attachment-container img {
    width: 24px; /* w-6 */
    height: 24px; /* h-6 */
    object-fit: cover;
    border-radius: 0.25rem; /* rounded */
}

.attachment-container a {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #d1d5db; /* slate-300 */
    text-decoration: none;
}

.attachment-container a:hover {
    text-decoration: underline;
}

.attachment-container span {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-container button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-container button:hover {
    color: #ef4444; /* red-500 */
}

#editor.drag-over {
    border: 2px dashed #9ca3af; /* slate-400 */
    background-color: #4b5563; /* slate-600 */
}


.fixed.inset-0.z-50.flex.items-center.justify-center.bg-black.bg-opacity-75 .bg-slate-800 img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 0.375rem;
}

.fixed.inset-0.z-50.flex.items-center.justify-center.bg-black.bg-opacity-75 .bg-slate-800 p {
    color: #d1d5db; 
    margin-top: 0.5rem;
    text-align: center;
}

.shadow-black {
    --tw-shadow-color: #0000001a !important;
    --tw-shadow: var(--tw-shadow-colored);
}