@import url("basic.css");

/* Basic Grid */
.basic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.grid-cell {
    background: #fff;
    border: 2px solid #0284c7;
    border-radius: 6px;
    padding: 20px 10px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Magic Auto-Fit Grid */
.magic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.card-item {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.card-item img {
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
}

.card-item span {
    font-size: 0.9rem;
    font-weight: bold;
    color: #334155;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 120px;
    gap: 14px;
}

.bento-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.bento-featured {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}

.bento-wide {
    grid-column: span 2;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.bento-tall {
    grid-row: span 2;
    background: #faf5ff;
    border-color: #e9d5ff;
}

/* Template Areas Layout */
.dashboard-grid {
    display: grid;
    grid-template-areas:
        "header header header"
        "sidebar main main"
        "sidebar widget widget"
        "footer footer footer";
    grid-template-columns: 180px 1fr 1fr;
    grid-template-rows: auto 1fr auto auto;
    gap: 12px;
    min-height: 320px;
}

.area-header  { grid-area: header; background: #1e293b; color: white; padding: 12px 16px; border-radius: 4px; }
.area-sidebar { grid-area: sidebar; background: #e2e8f0; padding: 16px; border-radius: 4px; }
.area-main    { grid-area: main; background: #ffffff; border: 2px solid #008080; padding: 16px; border-radius: 4px; }
.area-widget  { grid-area: widget; background: #fef3c7; border: 1px solid #fde68a; padding: 16px; border-radius: 4px; }
.area-footer  { grid-area: footer; background: #334155; color: white; padding: 12px 16px; border-radius: 4px; text-align: center; }

/* Place-items Center */
.place-center-box {
    display: grid;
    place-items: center;
    background: #f1f5f9;
    height: 180px;
    border-radius: 6px;
}

/* Feature 3: Subgrid Card System */
.subgrid-parent {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto 1fr auto;
    gap: 16px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.subgrid-card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.subgrid-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    font-weight: bold;
    color: #008080;
}

.subgrid-body {
    padding: 12px 0;
    font-size: 0.85rem;
    color: #475569;
}

.subgrid-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
    text-align: right;
}

