@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --theme-color: #E85222;
    --theme-color-dark: #ca3300;
    --theme-dark: black;
    --theme-dark-grey: rgb(68, 68, 68);
    --light-grey: #e9e9e9;
    --sidebar-width: 80px;
    --sidebar-width-expand: 250px;
    --navbar-height: 30px;
    --table-radius: 0.8rem;
}



* {
    transition: all 0.3s ease;
}

body {
    font-family: "Poppins", sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

.text-theme {
    color: var(--theme-color) !important;
}

.nav-theme {
    position: fixed;
    width: calc(100% - var(--sidebar-width));
    left: var(--sidebar-width);
    top: 0;
    height: var(--navbar-height);
    background: white;
    box-shadow: inset 0px -1px 0 #e9e9e9;
}

.nav-theme.expanded {
    width: calc(100% - var(--sidebar-width-expand));
    left: var(--sidebar-width-expand);
}

.sidebar-theme {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: white;
    box-shadow: inset -1px 0px 0 #e9e9e9;
}

.sidebar-theme.collapsed {
    width: var(--sidebar-width);
}

.sidebar-theme.expanded {
    width: var(--sidebar-width-expand);
}

.collapsed .side-brand span {
    display: none
}

.collapsed .menu-text {
    display: none;
}

.collapsed .dropdown-menu-list {
    display: none;
}


.side-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0.4rem;
    gap: 10px;
    overflow: hidden;
}

.menu-list {
    padding: 0;
    margin: 0;
}

.side-brand img {
    height: calc(var(--navbar-height) - 20px);
    width: auto;
}

.sidebar-theme.collapsed .side-brand img {
    display: block;
    margin: auto;
}

.side-brand span {
    font-size: 1.1rem;
    font-weight: 600;
}

.menu-list-box {
    padding: 0.8rem;
}

.menu-list-item {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: #f9f9f9;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0.6rem;
}

.sidebar-theme.collapsed .menu-list-item {
    text-align: center;
}

.menu-icon {
    padding: 0.4rem;
}

.menu-text {
    padding: 0.5rem;
}


.dropdown-menu-list {
    padding-left: 40px;
    display: none;
}

.menu-list-item.dropdown {
    position: relative;
}

.menu-list-item.dropdown::after {
    content: '\f107';
    font-family: "FontAwesome";
    position: absolute;
    top: 0.4rem;
    right: 0.8rem;
    transform-origin: center;
    transition: all 0.3s ease;
}

.menu-list-item.dropdown.expanded::after {
    transform: rotate(180deg);
}



.menu-list-item.dropdown.expanded .dropdown-menu-list {
    display: block;
}

.sidebar-theme.collapsed .dropdown-menu-list,
.sidebar-theme.collapsed .menu-list-item.dropdown::after {
    display: none !important;
}

.dropdown-menu-list li {
    margin: 3px 0;
    padding: 4px;
    border-radius: 4px;

}

.dropdown-menu-list li:hover {
    background: #ebebeb;
}


.dp-img {
    height: 50px;
    width: 50px;

}

.profile-menu {
    position: fixed;
    top: var(--navbar-height);
    right: 1rem;
    padding: 1rem;
    border-radius: 0.8rem;
    max-width: 250px;
    background: white;
    border: 1px solid #e5e5e5;
    opacity: 0;
    pointer-events: none;
    transform: translateY(25px);
    z-index: 500;
}

.profile-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.profile-items {
    padding: 0.4rem 0.6rem;
    width: 100%;
    border-radius: 0.4rem;
}



.page-wrapper-theme {
    width: calc(100vw - var(--sidebar-width));
    margin-top: var(--navbar-height);
    margin-left: var(--sidebar-width);
    padding: 1.2rem;
    background: #efefef;
    min-height: calc(100vh - var(--navbar-height));
}

.page-wrapper-theme.collapsed {
    width: calc(100vw - var(--sidebar-width-expand));
    margin-left: var(--sidebar-width-expand);
}


.login-flex-box {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.login-logo {
    position: absolute;
    bottom: calc(100% + 1rem);
    left: 0;
    right: 0;
    margin: auto;
    width: 100%;
    text-align: center;
}

.login-logo img {
    max-width: 380px;
    width: 100%;
    display: block;
    margin: auto;
}

.login-box {
    position: relative;
    max-width: 550px;
    width: 100%;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0 2px var(--theme-dark);
}


/* Inputs and Buttons */
input {
    display: block;
    width: 100%;
    border: 1px solid var(--theme-dark-grey);
    padding: 0.5rem 0.8rem;
    border-radius: 0.4rem;
}

input:hover,
input:focus,
input:active {
    outline: none;
    border: 1px solid var(--theme-dark);
}

.btn-theme {
    background: var(--theme-color);
    padding: 0.5rem 0.8rem;
    color: white;
    cursor: pointer;
    border-radius: 0.4rem;
}

.btn-theme:hover {
    background-color: var(--theme-color-dark);
}



#earning-chart {
    aspect-ratio: 16/10;
    width: 100%;
    height: auto;
}


/* Theme table  */
/* 
.theme-table{
    border: 1px solid var(--light-grey);
    border-radius: var(--table-radius);
    overflow: hidden;
    text-align: center;
} */

.theme-table table {
    display: table;
    width: 100%;
}

.theme-table table,
.theme-table td,
.theme-table th {
    border: 1px solid var(--light-grey);
    border-collapse: collapse;
}

.theme-table thead,
.theme-table tbody {
    width: 100%;
}

.theme-table td,
.theme-table th {
    padding: 0.4rem;
}

/* ==========================
   🎨 Brand Theme Variables (Migrated from Phase 1)
   ========================== */
@layer base {
    :root {
        --brand-from: #e15429;
        /* top of gradient */
        --brand-to: #272727;
        /* bottom of gradient */
        --brand-accent: #ce5129;
        /* solid accent color */
        --brand-accent-hover: #c63a3b;
        /* slightly darker hover accent */
        --brand-secondary: #e9e9eb;
        /*Used for sidebar background*/
    }
}

/* ==========================
   🌈 Custom Brand Utilities
   ========================== */
@layer utilities {
    .brand-gradient {
        @apply bg-gradient-to-b;
        background-image: linear-gradient(to bottom, var(--brand-from), var(--brand-to));
    }

    .brand-gradient-hover:hover {
        background-image: linear-gradient(to bottom, var(--brand-to), var(--brand-from));
    }

    .brand-accent {
        background-color: var(--brand-accent);
    }

    .brand-accent-text {
        color: var(--brand-accent);
    }

    .brand-focus {
        @apply focus:ring-2 focus:ring-offset-1;
        --tw-ring-color: var(--brand-from);
    }

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

/* ==========================
   📁 Sidebar Styling
   ========================== */
.sidebar-link {
    @apply flex items-center gap-2 px-4 py-3 w-full text-gray-700 text-left font-medium transition-all duration-200;
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: var(--brand-accent);
    color: white;
}

#jobsIcon {
    color: black;
    font-size: 10px;
}

.sidebar-link i {
    color: var(--brand-accent);
    transition: color 0.2s;
}

.sidebar-link:hover i,
.sidebar-link.active i {
    color: white;
}

.sidebar-sublink {
    @apply flex items-center gap-2 px-10 py-2 w-full text-gray-700 text-sm font-medium transition-all duration-200;
}

.sidebar-sublink:hover {
    background-color: var(--brand-accent);
    color: white;
}

.sidebar-sublink i {
    color: var(--brand-accent);
    transition: color 0.2s;
}

.sidebar-sublink:hover i {
    color: white;
}

.font-bootstrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.swal2-container {
    z-index: 1000000;
}