* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: dark light;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

header {
    margin-bottom: 50px;

    nav {
        display: flex;
        gap: 20px;

        a {
            text-decoration: none;
            font-weight: 600;
            padding: 8px 16px;
            border: 1px solid light-dark(black, white);
            color: light-dark(black, white);
            border-radius: 10px;
            transition: color ease-in-out 100ms;
            transition: border ease-in-out 100ms;

            &:hover {
                color: light-dark(pink, pink);
                border: 1px solid light-dark(pink, pink);
                transition: color ease-in-out 200ms;
                transition: border ease-in-out 200ms;
            }

            &.active {
                color: light-dark(white, black);
                background-color: pink;
                border: 1px solid light-dark(pink, pink);
            }
        }
    }
}

main {
    display: flex;
    flex-direction: column;

    h1 {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    form {

        div {
            display: flex;
            flex-direction: column;
            margin-bottom: 15px;

            label{
                font-size: 1.2rem;
                font-weight: 600;
                margin-bottom: 10px;
            }

            input {
                font-size: 1rem;
                padding: 8px 16px;
                border-radius: 10px;
                border: 1px solid light-dark(black, white);
                transition: outline ease-in-out 100ms;

                &:focus-visible {
                    outline: 2px solid pink;
                    color: light-dark(black, pink);
                    transition: outline ease-in-out 200ms;
                    
                }
            }
        }

        button {
            cursor: pointer;
            width: 100%;
            margin-top: 20px;
            font-size: 1.5rem;
            padding: 8px 16px;
            border-radius: 10px;
            border: 2px solid light-dark(black, pink);
            background: transparent;
            color: light-dark(black, pink);
            transition: background ease-in-out 100ms;

            &:hover {
                background: light-dark(black, pink);
                color: light-dark(white, black);
                transition: background ease-in-out 200ms;
            }

            &:disabled {
                cursor: default;
                border: 2px solid light-dark(rgb(0 0 0 / 0.5), rgb(0 0 0 / 0.5));
                background: transparent;
                color: light-dark(rgb(0 0 0 / 0.5), rgb(0 0 0 / 0.5));
            }
        }
    }

    table {
        border-collapse: collapse;

        tr {
            margin-bottom: 10px;
            border-bottom: 1px solid light-dark(black, pink);
            

            th {
                padding: 8px 16px;
                text-align: start;
            }

            td {
                padding: 8px 16px;
                text-align: start;

                button {
                    cursor: pointer;
                    padding: 2px 4px;
                    border-radius: 10px;
                    border: 2px solid light-dark(black, pink);
                    background: transparent;
                    color: light-dark(black, pink);
                    transition: background ease-in-out 100ms;

                    &:hover {
                        background: light-dark(black, pink);
                        color: light-dark(white, black);
                        transition: background ease-in-out 200ms;
                    }
                }
            }
        }
    }

    .modal {
        position: fixed;
        z-index: 1;
        inset: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: light-dark(white, rgb(0 0 0 / .9));

        form {
            gap: 20px;

            div {
                display: flex;
                flex-direction: column;
                margin-bottom: 15px;
    
                label{
                    font-size: 1.2rem;
                    font-weight: 600;
                    margin-bottom: 10px;
                }
    
                input {
                    font-size: 1rem;
                    padding: 8px 16px;
                    border-radius: 10px;
                    border: 1px solid light-dark(black, white);
                    transition: outline ease-in-out 100ms;
    
                    &:focus-visible {
                        outline: 2px solid pink;
                        color: light-dark(black, pink);
                        transition: outline ease-in-out 200ms;
                        
                    }
                }
            }
    
            button {
                cursor: pointer;
                width: 100%;
                margin-top: 20px;
                font-size: 1.5rem;
                padding: 8px 16px;
                border-radius: 10px;
                border: 2px solid light-dark(black, pink);
                background: transparent;
                color: light-dark(black, pink);
                transition: background ease-in-out 100ms;
    
                &:hover {
                    background: light-dark(black, pink);
                    color: light-dark(white, black);
                    transition: background ease-in-out 200ms;
                }
    
                &:disabled {
                    cursor: default;
                    border: 2px solid light-dark(rgb(0 0 0 / 0.5), rgb(0 0 0 / 0.5));
                    background: transparent;
                    color: light-dark(rgb(0 0 0 / 0.5), rgb(0 0 0 / 0.5));
                }
            }
        }
    }
}