/* ==================================================
   1. CARDS (Base & Specializations)
   ================================================== */

.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-std);
    box-shadow: var(--shadow-2);
    margin-bottom: var(--space-section);
    overflow: hidden;
    padding: var(--space-default);
}

.card-grid{
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-default);
}

.card-section {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-std);
    box-shadow: var(--shadow-2);
    overflow: hidden;
    padding: var(--space-default);
    margin-top:var(--space-section);
}

.card-demo {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-std);
    box-shadow: var(--shadow-2);
    margin-bottom: var(--space-section);
    overflow: hidden;
    padding: var(--space-default);
    border-top: 5px solid var(--action-main);
}

.kpi-card {
    padding: var(--space-default);
}

.card-header {
    margin-bottom: var(--space-default);
    padding-bottom: var(--space-micro);
    border-bottom: 1px solid var(--g-100);
}

.card-title {
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: var(--text-main);
}

/* ==================================================
   2. LOGS (Base & Specializations)
   ================================================== */


.log{
    padding: 12px 0;
    border-bottom: 1px solid var(--g-200);
}

.log-view{
    display: flex;
    justify-content: space-between;
}

.log-text{
    margin-top: 4px;
    color:var(--text-muted);
}


/* ==================================================
   3. NESTED CARDS (Base & Specializations)
   ================================================== */

.nested{
    margin-bottom:var(--space-section);
}

.nested-card {
    display: grid;
    grid-template-rows: 60px 120px 1fr;
    height: 100%;
}

.nested-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

.nested-list{
    padding-left: var(--space-default);
}

.nested-meta{
    color:var(--action-main);
}

/* ==================================================
   4. KPI GRID
   ================================================== */

.kpi-grid {
    gap: var(--space-default);
    display: grid; 
    grid-auto-flow: column; 
    grid-auto-columns: minmax(220px, 1fr); 
    gap: var(--space-default);
}

.kpi-label {
    font-size: var(--fs-sm);
    color: var(--text-side);
    margin-bottom: 4px;
}

.kpi-value {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--text-main);
}

/* ==================================================
   5. BUTTONS
   ================================================== */

.btn {
    padding: 14px;
    border-radius: 8px;
    font-weight: var(--fw-semibold);
    cursor: pointer;
    transition: transform 0.1s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--action-main);
    color: var(--white);
    box-shadow: var(--shadow-1);
    transform: translateY(-1px);
    font-size: var(--fs-base);
}

.btn-primary:hover {
    background-color: var(--action-hover);
 }

.btn-primary:active {
    transform: translateY(0); /* Returns to normal on click */
    filter: brightness(0.9);
}


/* ==================================================
   6. TABLES (Responsive Wrapper)
   ================================================== */

.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
}

.main-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.main-table th {
    background-color: var(--bg-header);
    padding: var(--space-default);
    text-align: left;
    font-size: var(--fs-sm);
    text-transform: uppercase;
    color: var(--text-muted);
}

.main-table td {
    padding: var(--space-default);
    border-bottom: 1px solid var(--g-100);
    color:var(--text-muted);    
}

.table-text{
    font-weight: var(--fw-medium);
    text-decoration: none;
    color: var(--action-main);
}

/* ==================================================
   7. RESPONSIVENESS (Media Queries)
   ================================================== */

/* Tablet and Desktop */
@media (min-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==================================================
   8. DEMO NAVIGATION
   ================================================== */

.btn-base {
    padding: 14px;
    border-radius: 8px;
    font-weight: var(--fw-semibold);
    cursor: pointer;
    transition: transform 0.1s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--action-main);
}

.demoNav{
    background: var(--g-200); 
    padding: 5px; 
    border-radius: 8px; 
    justify-self:stretch;
}

.aNav{
    text-decoration:none;
}


/* ==================================================
   9. STATUS CARDS / BORDERS
   ================================================== */

.base-status-card{
  background-color: var(--bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  margin-bottom: var(--space-section);
  overflow: hidden;
  padding: var(--space-default);
}
.card-error {
  border: 1px solid var(--border-std);
  border-top: 4px solid var(--st-error);
}  

.card-warning {
  border: 1px solid var(--border-std);
  border-top: 4px solid var(--st-warning);
}  

.card-success {
  border: 1px solid var(--border-std);
  border-top: 4px solid var(--st-success);
}  

.card-info {
  border: 1px solid var(--border-std);
  border-top: 4px solid var(--action-main);
}  

.card-disabled {
  border: 1px solid var(--border-std);
  border-top: 4px solid var(--st-disabled);
}  