/* ==========================================================
   FAMILY GENEALOGY SYSTEM
   STYLE.CSS - PART 1
   Theme: Teal / Emerald with Background Image
========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #263238;
    min-height: 100vh;
    margin: 0;
    padding: 0;

    background: url("/static/BG.png") no-repeat center center fixed;
    background-size: cover;
}

/* Light overlay for readability */
body::before {

    content:"";

    position:fixed;

    inset:0;

    background:rgba(255,255,255,0.55);

    z-index:-1;

}

.person-box,
.card,
.admin-card{

    background:rgba(255,255,255,0.95);

    backdrop-filter:blur(6px);

}

/* ==========================================================
   HEADER
========================================================== */

.header {
    background: linear-gradient(135deg, rgba(0, 105, 92, 0.95), rgba(0, 137, 123, 0.95));
    color: white;
    padding: 22px;
    text-align: center;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}

/* ==========================================================
   TOP BAR / NAVIGATION
========================================================== */

.topbar {
    background: rgba(255, 255, 255, 0.88);
    padding: 15px 35px;
    text-align: right;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .10);
    backdrop-filter: blur(8px);
}

.topbar a,
.back a,
.back-btn {
    text-decoration: none;
    background: #00695c;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    transition: .3s;
    font-weight: 600;
    display: inline-block;
}

.topbar a:hover,
.back a:hover,
.back-btn:hover {
    background: #004d40;
}

/* ==========================================================
   CONTAINER
========================================================== */

.container {
    width: 92%;
    max-width: 1400px;
    margin: 30px auto;
}

/* Home page center box */
.home-box,
.search-box {
    width: 55%;
    margin: 70px auto;
    background: rgba(255, 255, 255, 0.90);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .15);
    text-align: center;
    backdrop-filter: blur(8px);
}

.home-box h2,
.search-box h2 {
    color: #00695c;
    margin-bottom: 25px;
}

/* ==========================================================
   COMMON CARDS
========================================================== */

.person-box,
.card,
.admin-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
    margin-bottom: 25px;
    backdrop-filter: blur(8px);
}

.person-box {
    border-top: 6px solid #00897b;
    padding: 30px;
}

.person-box h2,
.admin-card h2,
.card h2 {
    color: #00695c;
    margin-bottom: 20px;
}

.person-box h2 {
    text-align: center;
    font-size: 34px;
}

/* ==========================================================
   SECTION TITLES
========================================================== */

.section-title {
    background: linear-gradient(90deg, rgba(0, 121, 107, .95), rgba(38, 166, 154, .95));
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 30px 0 15px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 105, 92, .25);
}

/* ==========================================================
   GRID LAYOUTS
========================================================== */

.grid,
.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

/* ==========================================================
   RELATIONSHIP CARDS
========================================================== */

.card {
    text-align: center;
    border-left: 5px solid #26a69a;
    transition: .3s;
}

.card:hover {
    background: rgba(241, 255, 251, 0.96);
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .18);
}

.card h4 {
    color: #607d8b;
    margin-bottom: 12px;
    font-size: 16px;
}

.card a {
    color: #00695c;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

.card a:hover {
    color: #ff9800;
    text-decoration: underline;
}

/* ==========================================================
   PERSON DETAILS TABLE
========================================================== */

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 12px;
    border-bottom: 1px solid #ececec;
    vertical-align: top;
}

.info-table td:first-child,
.info-table b {
    color: #00695c;
}

.empty {
    color: #777;
    font-style: italic;
}
/* ==========================================================
   FORMS
========================================================== */

form {
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #00695c;
    margin-bottom: 6px;
    font-size: 14px;
}

input,
select,
textarea {

    width: 100%;

    padding: 11px 14px;

    border: 1px solid #b2dfdb;

    border-radius: 8px;

    background: rgba(255,255,255,.90);

    font-size: 15px;

    transition: .3s;

}

input:focus,
select:focus,
textarea:focus {

    outline: none;

    border-color: #00897b;

    box-shadow: 0 0 10px rgba(0,137,123,.30);

}

textarea{

    resize: vertical;

    min-height:120px;

}

/* ==========================================================
   BUTTONS
========================================================== */

button{

    border:none;

    padding:12px 22px;

    border-radius:8px;

    cursor:pointer;

    color:white;

    font-size:15px;

    font-weight:bold;

    transition:.30s;

}

button:hover{

    transform:translateY(-2px);

}

.add-btn{

    background:#2e7d32;

}

.add-btn:hover{

    background:#1b5e20;

}

.update-btn{

    background:#1565c0;

}

.update-btn:hover{

    background:#0d47a1;

}

.delete-btn{

    background:#d32f2f;

}

.delete-btn:hover{

    background:#b71c1c;

}

.back-btn{

    background:#00695c;

}

.back-btn:hover{

    background:#004d40;

}

/* ==========================================================
   TABLES
========================================================== */

table{

    width:100%;

    border-collapse:collapse;

}

table th{

    background:#00897b;

    color:white;

    padding:12px;

}

table td{

    padding:12px;

    border-bottom:1px solid #ececec;

}

/* ==========================================================
   SELECT2
========================================================== */

.select2-container{

    width:100%!important;

}

.select2-selection{

    min-height:44px!important;

    border-radius:8px!important;

    border:1px solid #b2dfdb!important;

}

.select2-selection__rendered{

    line-height:42px!important;

    padding-left:10px!important;

}

.select2-selection__arrow{

    height:42px!important;

}

/* ==========================================================
   LINKS
========================================================== */

a{

    transition:.30s;

}

a:hover{

    text-decoration:none;

}

/* ==========================================================
   FOOTER
========================================================== */

.footer{

    margin-top:50px;

    background:rgba(0,105,92,.90);

    color:white;

    text-align:center;

    padding:20px;

    border-radius:10px;

    font-size:14px;

    box-shadow:0 4px 12px rgba(0,0,0,.15);

}

/* ==========================================================
   SCROLLBAR (Chrome/Edge)
========================================================== */

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-track{

    background:#e8f5f3;

}

::-webkit-scrollbar-thumb{

    background:#00897b;

    border-radius:10px;

}

::-webkit-scrollbar-thumb:hover{

    background:#00695c;

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width:992px){

    .container{

        width:96%;

    }

    .home-box,
    .search-box{

        width:90%;

    }

    .grid,
    .grid-form{

        grid-template-columns:repeat(auto-fit,minmax(180px,1fr));

    }

    .person-box h2{

        font-size:28px;

    }

}

@media (max-width:768px){

    .header{

        font-size:24px;

        padding:18px;

    }

    .topbar{

        text-align:center;

    }

    .home-box,
    .search-box{

        width:96%;

        padding:25px;

    }

    .grid,
    .grid-form{

        grid-template-columns:1fr;

    }

    .info-table td{

        display:block;

        width:100%;

    }

    button{

        width:100%;

    }

}

@media (max-width:480px){

    .header{

        font-size:20px;

    }

    .person-box h2{

        font-size:22px;

    }

    .section-title{

        font-size:18px;

    }

}
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
/* ===========================
   TOTAL PERSON CARD
=========================== */

.stats-card{

    width:300px;

    margin:25px auto;

    background:rgba(255,255,255,.92);

    border-radius:15px;

    text-align:center;

    padding:20px;

    box-shadow:0 8px 20px rgba(0,0,0,.15);

    border-left:6px solid #00897b;

}

.stats-card h3{

    color:#00695c;

    margin-bottom:10px;

}

.count{

    font-size:42px;

    font-weight:bold;

    color:#ff9800;

}

.stats{

    text-align:center;

    background:#e0f2f1;

    padding:10px;

    border-radius:8px;

    color:#00695c;

    font-size:18px;

    font-weight:bold;

}
.different-parent {
    background: #fff3e0 !important;
    border-left: 6px solid #ff9800 !important;
}

.different-parent a {
    color: #e65100 !important;
}

.relation-note {
    margin-top: 8px;
    font-size: 12px;
    color: #d84315;
    font-weight: bold;
}
.role-box {
    margin: 30px auto;
    background: rgba(255,255,255,.92);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

.role-btn {
    display: inline-block;
    margin: 10px;
    padding: 14px 24px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.guest {
    background: #00695c;
}

.user {
    background: #1976d2;
}

.admin {
    background: #d68910;
}

.role-btn:hover {
    opacity: .9;
}
.quote-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 22px;
    border-radius: 14px;
    margin-bottom: 25px;
    line-height: 1.9;
    font-size: 18px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0,0,0,.12);
    border-left: 6px solid #00897b;
}

.quote-source {
    margin-top: 15px;
    font-weight: bold;
    color: #00695c;
}
.instruction-box {
    background: rgba(255,255,255,0.95);
    padding: 25px 35px;
    border-radius: 14px;
    margin: 25px 0;
    box-shadow: 0 8px 22px rgba(0,0,0,.12);
    border-left: 6px solid #1976d2;
}

.instruction-box h2 {
    color: #00695c;
    text-align: center;
    margin-bottom: 18px;
}

.instruction-box ol {
    line-height: 2;
    font-size: 17px;
    padding-left: 25px;
}

.instruction-box li {
    margin-bottom: 8px;
}
