* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f172a;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-header {
    background-color: #1e293b;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #334155;
}

.logo-area h1 {
    color: #38bdf8;
    font-size: 1.8rem;
}

.logo-area span {
    font-size: 0.85rem;
    color: #94a3b8;
}

.status-badge {
    background-color: #10b981;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    flex: 1;
}

.card {
    background-color: #1e293b;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: #38bdf8;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

input, select {
    width: 100%;
    padding: 0.6rem;
    background-color: #0f172a;
    border: 1px solid #475569;
    color: #fff;
    border-radius: 4px;
}

.inline-fields {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

button {
    background-color: #0284c7;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s;
}

button:hover {
    background-color: #0369a1;
}

.btn-simulate {
    width: 100%;
    margin-top: 1rem;
    background-color: #10b981;
}

.btn-simulate:hover {
    background-color: #059669;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th, table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #334155;
}

table th {
    background-color: #334155;
    color: #38bdf8;
}


.gantt-flex {
    display: flex !important;
    align-items: center;
    background-color: #0f172a !important;
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 20px 15px !important;
    margin-top: 1rem;
    overflow-x: auto !important; 
    gap: 4px !important;
    box-sizing: border-box;
    width: 100%;
}

.gantt-block {
    position: relative !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px !important; 
    flex-shrink: 0 !important;
    box-sizing: border-box;
    padding: 0 !important;
}

.gantt-block:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.gantt-proc-name {
    font-size: 13px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.gantt-block .time-label {
    position: absolute !important;
    bottom: -22px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    font-family: monospace !important;
    background-color: #0f172a !important;
    padding: 0 4px !important;
    line-height: 1 !important;
}

.gantt-block .start-time {
    left: 0 !important;
}

.gantt-block .end-time {
    right: 0 !important;
}


.memory-layouts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.memory-map {
    background-color: #0f172a;
    border: 1px solid #334155;
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fragmentation-report {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: #f43f5e;
}

.memory-block-container {
    display: flex;
    width: 100%;
    height: 60px;
    border: 1px solid #475569;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
    background-color: #0f172a;
}

.sub-block {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px;
    transition: all 0.3s ease;
}

.memory-hole-free {
    width: 100%;
    background-color: #1e293b;
    color: #64748b;
    border: 1px dashed #334155;
}

.memory-process-allocated {
    background-color: #0284c7;
    color: #ffffff;
}

.memory-internal-fragment {
    background-color: #b45309;
    color: #fef08a;
    border-left: 2px dashed #f59e0b;
}


.dashboard-footer {
    background-color: #1e293b;
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
    color: #64748b;
    border-top: 1px solid #334155;
    margin-top: auto;
}