/* =========================================================
   TASK MANAGER PRO - MATERIAL DESIGN THEME
   ========================================================= */

.tmp-workspace {
    font-family: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #202124;
    background-color: #f0f2f5 !important; 
    padding-bottom: 5px;
}

/* ---------------------------------------------------------
   PANELS / CARDS
   --------------------------------------------------------- */

.tmp-workspace .panel,
.tmp-workspace .panel-default {
    background: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #dadce0 !important;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1), 0 1px 3px 1px rgba(60,64,67,0.05) !important;
    margin-bottom: 10px !important;
    overflow: visible !important; 
}

.tmp-workspace .panel-heading {
    background: #ffffff !important;
    border-bottom: 1px solid #e8eaed !important;
    padding: 18px 24px !important;
    border-radius: 8px 8px 0 0 !important;
}

.tmp-workspace .panel-heading h1,
.tmp-workspace .panel-heading h3,
.tmp-workspace .panel-title {
    color: #1a73e8 !important; /* Material Blue */
    font-size: 16px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tmp-workspace .panel-heading i { 
    color: #1a73e8 !important; 
    font-size: 20px !important; 
}

.tmp-workspace .panel-body {
    padding: 20px !important;
}

/* ---------------------------------------------------------
   DASHBOARD METRIC TILES
   --------------------------------------------------------- */

.tmp-workspace .tile {
    background: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #dadce0 !important;
    box-shadow: none !important;
    padding: 18px 20px !important;
    margin-bottom: 20px !important;
}

.tmp-workspace .tile-heading {
    background: transparent !important;
    color: #5f6368 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border: none !important;
    padding: 0 0 8px 0 !important;
    text-align: left !important;
}

.tmp-workspace .tile-body {
    background: transparent !important;
    color: #202124 !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    padding: 0 !important;
    text-align: left !important;
}

/* Solid Top Borders for Tiles */
.tmp-workspace .tile:nth-child(1), .tmp-workspace .tile-primary { border-top: 4px solid #1a73e8 !important; }
.tmp-workspace .tile:nth-child(2), .tmp-workspace .tile-warning { border-top: 4px solid #f29900 !important; }
.tmp-workspace .tile:nth-child(3), .tmp-workspace .tile-success { border-top: 4px solid #188038 !important; }
.tmp-workspace .tile:nth-child(4), .tmp-workspace .tile-danger  { border-top: 4px solid #d93025 !important; }
.tmp-workspace .tile:nth-child(5), .tmp-workspace .tile-info    { border-top: 4px solid #12b5cb !important; }

/* ---------------------------------------------------------
   TABLES - CUSTOM RESPONSIVE WRAPPERS (DECOUPLED)
   --------------------------------------------------------- */

/* 1. Main Task List Table - Independent Horizontal Scroll */
.tmp-workspace .tmp-main-table-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 8px !important;
    border: 1px solid #dadce0 !important;
    margin: 16px 0 20px 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    background: #ffffff !important;
}

/* Custom Scrollbar for Main Table */
.tmp-workspace .tmp-main-table-wrapper::-webkit-scrollbar { height: 8px; }
.tmp-workspace .tmp-main-table-wrapper::-webkit-scrollbar-track { background: #f8f9fa; border-radius: 0 0 8px 8px; border-top: 1px solid #dadce0; }
.tmp-workspace .tmp-main-table-wrapper::-webkit-scrollbar-thumb { background: #dadce0; border-radius: 8px; }
.tmp-workspace .tmp-main-table-wrapper::-webkit-scrollbar-thumb:hover { background: #bdc1c6; }

/* Main Table Enforced Minimum Width to prevent squishing */
.tmp-workspace .tmp-main-table-wrapper table {
    min-width: 1200px !important; 
    width: 100% !important; 
    border-collapse: collapse !important; 
    border-spacing: 0 !important; 
    border-style: hidden !important; 
    background: transparent !important;
    margin: 0 !important;
}

/* 2. Task Breakdown Table - Static width, no scroll */
.tmp-workspace .tmp-breakdown-wrapper {
    display: block !important;
    width: 100% !important;
    border-radius: 8px !important;
    border: 1px solid #dadce0 !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
}

.tmp-workspace .tmp-breakdown-wrapper table {
    width: 100% !important;
    min-width: 100% !important; /* Fits to screen size naturally */
    border-collapse: collapse !important;
    border-style: hidden !important; 
    margin: 0 !important;
}

/* Fallback for generic tables that still use .table-responsive */
.tmp-workspace .table-responsive {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 8px !important;
    border: 1px solid #dadce0 !important;
    margin: 16px 0 20px 0 !important; 
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    background: #ffffff !important;
}

.tmp-workspace .table-responsive::-webkit-scrollbar { height: 8px; }
.tmp-workspace .table-responsive::-webkit-scrollbar-track { background: #f8f9fa; border-radius: 0 0 8px 8px; border-top: 1px solid #dadce0; }
.tmp-workspace .table-responsive::-webkit-scrollbar-thumb { background: #dadce0; border-radius: 8px; }
.tmp-workspace .table-responsive::-webkit-scrollbar-thumb:hover { background: #bdc1c6; }

.tmp-workspace .table-responsive table {
    min-width: 100% !important; 
    width: 100% !important; 
    border-collapse: collapse !important; 
    border-spacing: 0 !important; 
    border-style: hidden !important; 
    background: transparent !important;
    margin: 0 !important;
}

/* Force horizontal scroll ONLY on the main Task List table form */
.tmp-workspace #form-task table, 
.tmp-workspace #form-task .table {
    min-width: 1200px !important; 
}

/* ---------------------------------------------------------
   TABLE HEADERS & CELLS
   --------------------------------------------------------- */
/* Headers */
.tmp-workspace table thead th, 
.tmp-workspace table thead td {
    background-color: #f8f9fa !important;
    color: #5f6368 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid #dadce0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    white-space: nowrap !important;
}

/* Cells */
.tmp-workspace table tbody td {
    color: #3c4043 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid #f1f3f4 !important;
    border-left: none !important;
    border-right: none !important;
    vertical-align: middle !important;
}

.tmp-workspace table tbody tr:hover td { 
    filter: brightness(0.97) !important;
    transition: filter 0.15s ease !important;
}

/* Soft Material Status Row Colors */
.tmp-workspace table tbody tr.status-pending td   { background-color: #fff8e1 !important; border-bottom-color: #fce8b2 !important; }
.tmp-workspace table tbody tr.status-working td   { background-color: #e8f0fe !important; border-bottom-color: #d2e3fc !important; }
.tmp-workspace table tbody tr.status-completed td { background-color: #e6f4ea !important; border-bottom-color: #ceead6 !important; }
.tmp-workspace table tbody tr.status-reminder td  { background-color: #fce8e6 !important; border-bottom-color: #fad2cf !important; }
.tmp-workspace table tbody tr.status-inactive td  { background-color: #f8f9fa !important; border-bottom-color: #f1f3f4 !important; }

/* ---------------------------------------------------------
   FORM INPUTS
   --------------------------------------------------------- */
.tmp-workspace .form-control {
    border-radius: 4px !important;
    border: 1px solid #dadce0 !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    color: #202124 !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.tmp-workspace .form-control:focus {
    border-color: #1a73e8 !important;
    outline: none !important;
    box-shadow: inset 0 0 0 1px #1a73e8 !important; /* Material focus ring */
}

/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */
.tmp-workspace .btn {
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.25px !important;
    transition: box-shadow 0.2s ease, background 0.2s ease !important;
}

.tmp-workspace .btn:hover {
    box-shadow: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15) !important;
}

.tmp-workspace .btn-primary { background: #1a73e8 !important; color: #fff !important; }
.tmp-workspace .btn-success { background: #188038 !important; color: #fff !important; }
.tmp-workspace .btn-info { background: #12b5cb !important; color: #fff !important; }
.tmp-workspace .btn-danger { background: #d93025 !important; color: #fff !important; }

/* Action Buttons Inside Table */
.tmp-workspace table .btn,
.tmp-workspace table .btn-default {
    background: #ffffff !important;
    border: 1px solid #dadce0 !important;
    color: #5f6368 !important;
    padding: 6px 10px !important;
    min-width: 36px !important;
    justify-content: center !important;
    box-shadow: none !important;
    border-radius: 4px !important;
}

.tmp-workspace table .btn:hover,
.tmp-workspace table .btn-default:hover {
    background: #f1f3f4 !important;
    color: #1a73e8 !important;
}

.tmp-workspace table .btn i,
.tmp-workspace table .btn .fa {
    color: inherit !important;
}

/* ---------------------------------------------------------
   GLOWING MENU ITEM
   --------------------------------------------------------- */
#column-left a .glowing-menu-item {
    color: #90D5FF !important;
    font-weight: bold !important;
}

#column-left a:hover .glowing-menu-item {
    color: #f7d9bc !important;
}