/* ==============================
   POWER90 PARENT DASHBOARD
   COMPLETE MASTER CSS
============================== */

/* ==============================
   LAYOUT
============================== */
.po90-wrap {
    display: flex;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #f9fafb;
}

.po90-sidebar {
    width: 240px;
    background: #ffffff;
    padding: 25px 20px;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.po90-content {
    flex: 1;
    padding: 35px 40px;
    min-width: 0;
}

/* ==============================
   SIDEBAR MENU
============================== */
.po90-sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.po90-sidebar-menu li {
    margin-bottom: 8px;
}

.po90-sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: #4b5563;
    border-radius: 8px;
    font-weight: 500;
    transition: 0.2s ease;
}

.po90-sidebar-menu a:hover {
    background: #f3f4f6;
    color: #111827;
}

.po90-sidebar-menu a.active {
    background: #f65d4e;
    color: #ffffff;
}

/* ==============================
   SECTIONS
============================== */
.po90-section,
.po90-children-section,
.po90-welcome-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.04);
    margin-bottom: 25px;
}

.po90-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.po90-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.po90-section-header h3 {
    margin: 0;
    font-size: 20px;
    color: #111827;
}

.po90-children-count {
    background: #f65d4e;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ==============================
   CHILDREN TABLE
============================== */
.po90-table-responsive {
    overflow-x: auto;
}

.po90-children-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px;
}

.po90-children-table thead {
    background: #f3f4f6;
}

.po90-children-table th {
    padding: 14px;
    text-align: left;
    font-weight: 600;
    color: #374151;
}

.po90-children-table td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.po90-child-row:hover {
    background: #f9fafb;
}

/* Column Widths */
.col-name { width: 40%; }
.col-created { width: 20%; }
.col-updated { width: 20%; }
.col-actions {
    width: 225px;
    text-align: right;
}

/* Dates */
.po90-date {
    display: block;
    color: #111827;
}

.po90-time {
    display: block;
    font-size: 12px;
    color: #9ca3af;
}

/* ==============================
   ACTION BUTTONS (TABLE)
============================== */
.po90-action-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}

.po90-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s ease;
    white-space: nowrap;
    font-weight: bold;
}

/* Small Icon Buttons */
.po90-btn-sm {
    width: 32px;
    height: 32px;
    padding: 0;
}

/* Button Colors */
.po90-btn-secondary {
    background: #f65d4e;
    color: #ffffff;
}

.po90-btn-secondary:hover {
    background: #e14b3c;
    color: #ffffff;
}

.po90-btn-danger {
    background: #dc3545;
    color: #ffffff;
}

.po90-btn-danger:hover {
    background: #c82333;
}

.po90-btn-warning {
    background: #f59e0b;
    color: #ffffff;
}

.po90-btn-warning:hover {
    background: #d97706;
}

/* Empty State */
.po90-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

/* ==============================
   CHILD FORM
============================== */
.po90-edit-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.04);
    max-width: 650px;
    margin: 0 auto 30px auto;
    position: relative;
}

.po90-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.po90-form-header h3 {
    font-size: 22px;
    color: #111827;
    margin: 0;
}

.po90-btn-close {
    background: #f3f4f6;
    color: #374151;
    font-size: 20px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.po90-btn-close:hover {
    background: #f65d4e;
    color: #fff;
    transform: translateY(-1px);
}

/* Alerts */
.po90-alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.po90-alert-success {
    background: #d1fae5;
    color: #065f46;
}

.po90-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Form Layout */
.po90-child-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.po90-form-group {
    display: flex;
    flex-direction: column;
}

.po90-form-row {
    display: flex;
    gap: 20px;
}

.po90-form-col {
    flex: 1;
}

.po90-form-label {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 6px;
}

.po90-required {
    color: #f65d4e;
    margin-left: 2px;
}

.po90-optional {
    font-weight: 400;
    font-size: 12px;
    color: #9ca3af;
    margin-left: 4px;
}

.po90-form-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    transition: border-color 0.2s ease;
}

.po90-form-input:focus {
    border-color: #f65d4e;
    outline: none;
}

.po90-help-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Form Actions */
.po90-form-actions {
    /* display: flex; */
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
    text-align: center;
}

.po90-btn-large {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    font-weight: 600;
}

.po90-btn-primary {
    background: #f65d4e;
    color: #ffffff;
}

.po90-btn-primary:hover {
    background: #e14b3c;
}


/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 768px) {

    .po90-wrap {
        flex-direction: column;
    }

    .po90-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 15px;
    }

    .po90-sidebar-menu {
        display: flex;
        overflow-x: auto;
        gap: 10px;
    }

    .po90-sidebar-menu li {
        flex: 0 0 auto;
        margin-bottom: 0;
    }

    .po90-sidebar-menu a {
        white-space: nowrap;
    }

    .po90-content {
        padding: 20px;
    }

    .col-created,
    .col-updated {
        display: none;
    }

    .col-name { width: 55%; }
    .col-actions { width: 45%; }

    .po90-btn-sm {
        width: 28px;
        height: 28px;
    }

    .po90-form-row {
        flex-direction: column;
    }
}
